From: TRANS Date: 2007-06-15T07:50:00+09:00 Subject: Re: What should this code do? On 6/14/07, John Lam (CLR) wrote: > > > > > Thinking about control flow these days � > > > > i = 0 > > while i < 10 do > > puts i > > > > class Foo > > break > > end > > > > i += 1 > > end 'class' creates an isolated scope, so I would expect it to raise an error. However if it were: while i < 10 do puts i Foo = Class.new do break end i += 1 end I'm not so sure. does Class.new setup some type of begin...end...ensure mechanism? T.