From: Martin DeMello Date: 2009-11-05T05:18:02+09:00 Subject: Re: Ruby doesn't implement x++ for Fixnum's because ??? On Thu, Nov 5, 2009 at 12:55 AM, RichardOnRails wrote: > > BTW,  I'm not advocating x++ for Ruby.  I'm just trying to understand > whether Ruby would literally change 1 to 2 as opposed to change a > variable that contains 1 to subsequently contain 2. Variables don't contain values, they refer to objects. That's the fundamental difference. So if you say, for instance a = "hello world" a.upcase! a #=> "HELLO WORLD" the message "upcase!" is sent to the *object* "hello world", not the variable a. To see this: a = "hello world" b = a a.upcase! a #=> "HELLO WORLD" b #=> "HELLO WORLD" Fixnums are immutable objects; you can't have any method that changes their value. Hence no ++ martin