Ruby defines #clone
in Object.
To my suprise, some classes raise Exceptions when calling it.
I found NilClass, TrueClass, FalseClass, Fixnum having this behaviour.
1) Does a complete list of classes (at least core-classes) exist, which do not allow #clone
?
Or is there a way to detect if a specific class supports #clone
?
2) Wtf? What is wrong with 42.clone
?