class Object

def deep_dup

dup.instance_variable_defined?(:@a) # => true
object.instance_variable_defined?(:@a) # => false

dup.instance_variable_set(:@a, 1)
dup = object.deep_dup
object = Object.new

not duplicable, returns +self+.
Returns a deep copy of object if it's duplicable. If it's
def deep_dup
  duplicable? ? dup : self
end