From: Michael Granger Date: 2003-09-12T11:52:24+09:00 Subject: Re: Passing an Object Class from a method to a caller On Thursday, September 11, 2003, at 03:49 PM, dblack@superlink.net wrote: >> This happens because your break causes the value of the last evaluated >> statement (i.e., the 'print') to be the result of the 'for' loop, >> which is >> what it breaks out of. > > I think break (pre-1.8.0 or without explicit value in 1.8.0) evaluates > to nil: > > $ ruby -ve 'def x; for a in [1]; b=2; break; end; end; p x' > ruby 1.6.8 (2002-12-24) [powerpc-darwin6.3] > nil I stand corrected. -- Michael Granger Rubymage, Believer, Architect The FaerieMUD Consortium