From: James Edward Gray II Date: 2006-06-01T06:11:35+09:00 Subject: Re: Newbie: Does Array.each guarantee an ordered result? On May 31, 2006, at 2:44 PM, transfire@gmail.com wrote: > They are the same. A for-loop is "translated" into an each-loop. Well, almost: >> things = [1, 2, 3] => [1, 2, 3] >> things.each { |thing| } => [1, 2, 3] >> thing NameError: undefined local variable or method `thing' for main:Object from (irb):3 from :0 >> for thing in things >> # ... ?> end => [1, 2, 3] >> thing => 3 James Edward Gray II