From: Justin Collins Date: 2009-08-26T03:35:32+09:00 Subject: Re: operators vs. methods Brian Candler wrote: > I have written programs which use x.send(:[]=, val). I call this smiley > programming :-@ Why would you do that, though? irb(main):001:0> class A irb(main):002:1> def []= index, value irb(main):003:2> puts "Index: #{index} Value: #{value}" irb(main):004:2> end irb(main):005:1> end => nil irb(main):006:0> A.new[1] = "hello" Index: 1 Value: hello => "hello" Is it because you only want to send a single value with no index? -Justin