Hi,
In message "[ruby-talk:19819] Re: Why not?: Assigning to self"
on 01/08/16, Ned Konz <ned / bike-nomad.com> writes:
|That's interesting. Doesn't this change the class of a?
Ah, yes.
|a = "abcd"
|def a.something; end
|
|If so, it would seem that the system already deals with objects that can
|change classes (because singleton classes can be constructed on the fly).
This is the case "become" safe. But I can think of many examples of
crashes caused by "become". Even simple "Array.become Hash" would
cause segmentation fault.
matz.