From: 7stud -- Date: 2009-02-27T04:25:55+09:00 Subject: Re: "def nothing=(data) false end" returns 'data' instead of Igor Pirnovar wrote: > The bug showed up in a slightly > incorrect use of this feature and I do believe should be fixed if for > nothing else but for the sake of completeness, when all far more serious > bugs are fixed ;) > > +-----------------------+ > | class MyTest | > | def nothing(data) | > | return false | > | end | > | end | > | o = MyTest.new | > | puts o.nothing=(123) | > |-----------------------| > |OUTPUTS: false | > +-----------------------+ > I get the expected output with ruby 1.8.2: class A def nothing(data) return "hello" end end a = A.new puts a.nothing=(123) --output:--r1test.rb:51: undefined method `nothing=' for # (NoMethodError) -- Posted via http://www.ruby-forum.com/.