From: Joel VanderWerf Date: 2002-06-12T01:19:18+09:00 Subject: Re: def += Jean-Hugues ROBERT wrote: > How is that += automatically generated (if at all) ? Actaully, += is not a method. IIRC x += 1 just syntax sugar for x = x + 1. If it were a method, what would the receiver be? Normally in Ruby the receiver of x.foo is the object which is the _value_ of x, but in this case you want to replace one value with another. In other words, you need to operate on the variable itself. In Ruby, that can only be done with assignment, for good reasons.