On 4/5/07, Yukihiro Matsumoto <matz / ruby-lang.org> wrote: > Hi, > > In message "Re: defined? operator changed in ruby 1.9: bug or feature?" > on Thu, 5 Apr 2007 13:45:51 +0900, Nobuyoshi Nakada <nobu / ruby-lang.org> writes: > > |At Thu, 5 Apr 2007 08:51:10 +0900, David Flanagan wrote in [ruby-core:10867]: > |> The behavior of the defined? operator is different in current ruby 1.9 > |> snapshots than it is in 1.8.5. Anyone know whether this is a bug or a > |> feature? > | > |Bug. > > Can you commit? I found this a bit strange also: rick@frodo:/public/rubyscripts$ ruby -e 'print defined? a,"\n";print a,"\n"' nil -e:1: undefined local variable or method `a' for main:Object (NameError) rick@frodo:/public/rubyscripts$ ruby -e 'print defined? a=1,"\n";print a,"\n"' assignment nil rick@frodo:/public/rubyscripts$ So even in 1.8, although the define? a=1 isn't performing the assignment, it IS defining the variable. Is this the way it should work? -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/