We can run the code through CRuby and observe the behavior. We just weren't sure whether the behavior that we saw was a bug or not :)

Thanks,
-John


-----Original Message-----
From: MenTaLguY [mailto:mental / rydia.net]
Sent: Thursday, June 14, 2007 4:01 PM
To: ruby-core / ruby-lang.org
Subject: Re: What should this code do?

On Fri, 15 Jun 2007 07:38:42 +0900, "John Lam (CLR)" <jflam / microsoft.com> 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?

-mental