I have values of various datatypes coming into this method and the
method does a dup, since it modifies the values and obviously does not
want to change the original.

However, Fixnum's do respond to :dup but give an error when called.
First off, can someone explain this to me.
Second, i have worked around it with a "rescue" clause.

In future, should I avoid using "respond_to?" since it could cause
errors. Should I always use rescue.
I now have:

value = value.dup rescue value
-- 
Posted via http://www.ruby-forum.com/.