From: Nathaniel Talbott Date: 2003-12-29T14:34:40+09:00 Subject: Re: Inconsistent value of uninitialized variable On Dec 28, 2003, at 23:11, Martin DeMello wrote: > Nathaniel Talbott wrote: >> Isn't it this behavior that makes it possible to define a recursive >> block? >> >> y = 0 >> x = proc{y += 1; x.call unless(y == 100); y} >> p x.call >> >> I suppose you could require a prior assignment to x in this case, but >> that starts to smell like having to declare variables... > > This is not a proper recursive block - for instance > > y = 0 > x = proc{y += 1; x.call unless(y == 100); y} > z = x > x = nil > z.call "Not proper" might be strong language, but yes, it could definitely be broken. Do you have a better construct for a recursive block? Nathaniel <:((><