On Jun 28, 2009, at 16:48 , Mike Ryan wrote:

> Bug #1698: Incorrect return value for writer methods.
> http://redmine.ruby-lang.org/issues/show/1698
>
> Author: Mike Ryan
> Status: Open, Priority: Normal
> ruby -v: ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-darwin9]
>
> I found the following behavior this past week and found it a bit odd.
>
> irb(main):001:0> class Foo
> irb(main):002:1>  def bar=(bla)
> irb(main):003:2>   @bar = bla * 2
> irb(main):004:2>  end
> irb(main):005:1>  def bar
> irb(main):006:2>   @bar
> irb(main):007:2>  end
> irb(main):008:1> end

This is intentional. The result of any assignment expression is always  
the RHS.