From: Jean-Hugues ROBERT Date: 2004-05-01T01:12:05+09:00 Subject: def [](v) xx; return yy; end # returned value is ignored !? Hi, For some class I am redefining operator []=(x). Works great. However when I use it, p xx[] = zz prints zz, not the value returned by my method. It makes some sense yet I would have thought that the responsibility for that should belong to my method. Am I missing something ? class Test def []=(x) nil end end p Test.new[] = "hello" # => "hello", I was expecting nil Yours, Jean-Hugues ------------------------------------------------------------------------- Web: http://hdl.handle.net/1030.37/1.1 Phone: +33 (0) 4 92 27 74 17