From: Mark Hubbart Date: 2004-05-01T03:39:11+09:00 Subject: Re: def [](v) xx; return yy; end # returned value is ignored !? On Apr 30, 2004, at 11:12 AM, Mark Sparshatt wrote: >> If you REALLY need to get around this, try: >> >> Test.new.send(:[]=, "hello") > > Actually there's an easier way, you can just use > > Test.new.[]= "hello" Ahhh. You're right; I guess it works differently with the brackets. This behavior will not, however, translate to #foo=()... Test.new.foo=("hello") ==>"hello" Test.new.send(:foo=, "hello") ==>nil regardless, It's not considered kosher to expect a return value from an assignment to be different from the value being assigned. --Mark