From: Chad Perrin Date: 2007-04-05T05:12:22+09:00 Subject: Re: nil? and non-existent objects On Thu, Apr 05, 2007 at 04:46:12AM +0900, Emmanuel Oga wrote: > I think is because of the ruby's analisis on the scope. That is, in: > > puts x = 1 if x.nil? > > ruby sees x in the scope even if it is never accesed nor asigned, but in > > puts ???z is not defined??? if z.nil? > > z is never in scope, because it is present only inside a string, it does > not appear anywhere before the call of the method "nil?" Is that a spec detail or an implementation detail? It might be nice to know whether, assuming a stable language specification, that operational characteristic might go away at some point. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]