I was always under assumption that the block accepts the return value of the iterator as the argument to the block, but look at this:
Array.new(500) do | i | puts i end I expect i to be an array instance with 500 indexes all will nil values. However, what it returns is indeed an array with 500 indexes all with nil values BUT before it returns that array instance, the block appears to execute 500 times passing an actual integer value into the block incrementing by 1 each time. I dont understand why this is happening. thanks for response -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.