Elias Athanasopoulos wrote:
I don't think so, because foo is a reference to a Float object, and
Float objects are immutable. In contrast, if foo were a reference to
some kind of mutable object (like a String), you *could* change its
value without creating a new object in the process, e.g.
foo = "a string"
puts foo.id # should be the same as before the sub!
Hope this helps,