Sylvain Joyeux wrote: > That's because of the way Ruby decides wether a local variable exists or > not. Basically, a local variable is defined the first time it is assigned > to, so in the first case > >> def A.test >> a if a=1 >> end > > a=1, which defines the local, is seen *after* the 'a' statement. So, 'a' > does not exist and boom OK, thanks Sylvain. But I would have thought that any examination of the guarded statement would be delayed until after the condition had been evaluated. Is a parse like this possible?