Fixnum is immutable. What happens when you add 1 to your Fixnum is that 
it becomes a different Fixnum with a different object id.

String is mutable. When you modify a String, it retains its object id, 
but each instance of a String has a different object id.

irb(main):006:0> a.object_id
=> 3
irb(main):007:0> b.object_id
=> 3
irb(main):008:0> a = "a"
=> "a"
irb(main):009:0> b = "a"
=> "a"
irb(main):010:0> a.object_id
=> 24142944
irb(main):011:0> b.object_id
=> 23626116

-- 
Posted via http://www.ruby-forum.com/.