Hi all !
Symbol lies about it's ability to respond_to? to #dup:
irb(main):001:0> :s.respond_to?(:dup)
=> true
irb(main):002:0> :s.dup
TypeError: can't dup Symbol
from (irb):2:in `dup'
from (irb):2
Fixnum does the same thing. You might argue that the object *can*
respond to :dup, except it's simply illegal to respond to it.
Anyway, my feeling is that Symbol and Fixnum (probably Numeric) should
not respond_to?(:dup).
Thanks !
···
--
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/