From: Mike Cahill Date: 2007-05-22T21:48:51+09:00 Subject: Re: bug in ruby Sorry - where's the bug? You think the p bar should give 1? I believe you are thinking of p @bar ?? Or have I - as I often do - missed the point? =) -----Original Message----- From: sairam MP Date: Tue, 22 May 2007 21:41:03 To:ruby-talk@ruby-lang.org (ruby-talk ML) Subject: bug in ruby class Foo attr_accessor :bar def foo self.bar = 1 if false bar = 2 # never executed end p self.bar # prints 1 p bar # prints nil end end -- Posted via http://www.ruby-forum.com/.