Sometimes an index in some data structure goes from 0 to struct.size () - 1. Then it is useful to have a way to say the following:
a = ['a','b','c'] for i in 0 ... a.length puts a[i] end
will print 'a' , 'b' , 'c' . You use the form .. , it prints an extra nil .
source share