From: ts Date: 2001-08-15T17:13:19+09:00 Subject: [ruby-talk:19761] Re: Why not?: Assigning to self >>>>> "N" == Ned Konz writes: N> I should have said "supertype". Clearly, if you swap a Class for an Array, Even this don't work pigeon% ruby -e 'a = []; Array.become Hash; p a' -e:1: [BUG] Segmentation fault ruby 1.6.4 (2001-06-04) [i686-linux] Aborted pigeon% Array and Hash has the same type (Class) N> you're going to have problems. But Ruby is a dynamic language with untyped N> variables anyway; it's easy to pass the wrong type as an argument to a N> method. And few people who are comfortable with dynamic languages seem to N> have problems with this, since they know better than to pass the wrong type. N> I don't see that introducing become() (if it could be done without affecting N> other parts of the language) would hurt, and it would help in those N> (admittedly uncommon) cases where it's warranted. Now if ruby is embedded in an application the result is just the crash of the application. There is a name for this : denial of service attack. This mean that if ruby has #become, as it is actually, all applications with ruby embedded must be changed, and the modification is to undef #become Guy Decoux