From: Hal Fulton Date: 2006-01-03T05:08:47+09:00 Subject: Re: New to Ruby and Programming Chad Perrin wrote: > On Tue, Jan 03, 2006 at 12:03:03AM +0900, James Edward Gray II wrote: > >>On Jan 2, 2006, at 2:29 AM, Chad Perrin wrote: >> >> >>>In particular, you could have an array called myarray >>>(for example) and iterate over its contents using the each method to >>>perform the same action on each element of the array: >>> >>> myarray.each do { |foo| puts foo } >> >>Only we would never write that since the following does the same thing: >> >>puts myarray > > > Well . . . true. > > This is why I don't teach programming. > Actually, I think there's a difference in behavior if you try them both. Hal