Yossef Mendelssohn wrote: > On Feb 23, 3:24 pm, Robert Klemme <shortcut... / googlemail.com> wrote: > >> This is irrelevant from a user's point of view. The logic stays the same: >> >> b = 1 # or any other object! >> a = b # a now points to the same object, 1 in this case >> b = 2 # or any other object! a still points to 1 while b points to 2 >> > > I only pointed it out because there's no way (that I know of) to show > that a and b point to the same object at one point if a Fixnum is > used. You can use 'hi'.sub!, but there's no 1.succ! However, Fixnums can have instance variables, just like any other number. class Fixnum attr_accessor :foo end 5.foo = :bar 4.foo # nil 6.foo # nil 5.foo # :bar