From: "Kontra, Gergely" Date: 2002-10-12T02:10:27+09:00 Subject: Re: Different Behavior of Class Variables w.r.t ||= >> Oops, 1.7 behavior has changed. Bad idea? >> # [ruby-talk:50421] & [ruby-dev:18278] > >I am not too sure which way it has been made consistent. Does ||= work >on all variables similarly now? It looks like it, from what I can gather >from the patch source... *cvs update, compile* ... yup, ||= works on all >now. The root of the problem might be: irb(main):001:0> a NameError: undefined local variable or method `a' for # from (irb):1 irb(main):002:0> @a nil irb(main):003:0> @@a NameError: uninitialized class variable @@a in Object from (irb):3 But then why: irb(main):008:0> b||true NameError: undefined local variable or method `b' for # from (irb):8 irb(main):009:0> b||=true It seems like ||= has some extra hacking. Any ideas? Using ruby-1.7.4 under WinME, downloaded from PragmaticProgrammer What about the above with the CVS version? ps: When will be a newer installer available under windows? Gergo +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ | Email: kgergely@mcl.hu, kgergely@turul.eet.bme.hu | | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ . Magyar php mirror es magyar php dokumentacio: http://hu.php.net