From: Charles Oliver Nutter Date: 2007-06-15T10:08:22+09:00 Subject: Re: What should this code do? MenTaLguY wrote: > On Fri, 15 Jun 2007 07:38:42 +0900, "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 > > It should print 0 and then exit the loop. Class and module scopes don't have any special influence on control flow. > > I have to ask, though -- I know you're not allowed to look at CRuby source, but does this mean you're also not allowed to run CRuby to test behavior empirically? Confirmed also with JRuby. 0 then exit. - Charlie