From: Gary Wright Date: 2008-02-22T09:53:37+09:00 Subject: Re: How to define the assignment operator in Ruby ? On Feb 21, 2008, at 9:10 AM, Ilan Berci wrote: > In ruby, we don't assign to an instance as you mentioned, we assign > to a > variable that can hold any type. We therefore can't override the > assignment operator. > > BUT you can override an assignment operation.. such as Setter methods may look like assignment, but semantically they are method calls. I think it just confuses matters to call setter method invocation an 'assignment operation'. The desire to override assignment or define an assignment operator is generally indicative of some misunderstanding regarding Ruby's object model. Gary Wright