Well, you wrote a great Array Analyzer
Here it is:

def array_101
  for i in [0 ... self.length]
    puts "#{i} => #{self[i]}"
  end
end

And prepared the following array for test:

a = ['a','s','d']

What do you think, it will print?

Yeeees, you are right.
And the answer is...

0...3 => asd

:-)))))))))

try it at home:

irb(main):001:0> def array_101
irb(main):002:1> for i in [0 ... self.length]
irb(main):003:2>   puts "#{i} => #{self[i]}"
irb(main):004:2> end
irb(main):005:1> end
=> nil
irb(main):006:0> a = ['a','s','d']
=> ["a", "s", "d"]
irb(main):007:0> a.array_101
0...3 => asd
=> [0...3]
;-)

-- 
Posted via http://www.ruby-forum.com/.