From: Arup Rakshit Date: 2013-02-02T21:27:00+09:00 Subject: Confusion with Enum#with_index I was playing to understand the method "Enum#with_index" with the below code: =================================================== irb(main):024:0> xs = ['a', 'b', 'c'] => ["a", "b", "c"] irb(main):025:0> xs.to_enum.with_index(2) => #:with_index(2)> ==================================================== irb(main):014:0> to_three = Enumerator.new do |y| irb(main):015:1* 3.times do |x| irb(main):016:2* y< end irb(main):018:1> end => #:each> irb(main):027:0> to_three.with_index(2) => #:each>:with_ind ex(2)> ==================================================== Couldn't understand the output of "to_three.with_index(2)" . Could anyone help me? -- Posted via http://www.ruby-forum.com/.