Module CoreEx::TryDup
In: lib/core_ex/try_dup.rb

Some objects are dupable, some are not. So we define a version of dup (called try_dup) that returns self on the handful of classes that are not dupable. (imported from rake (rake_dup))

Methods

try_dup  

Public Instance methods

Duplicate an object if it can be duplicated. If it can not be cloned or duplicated, then just return the original object.

[Source]

# File lib/core_ex/try_dup.rb, line 16
    def try_dup
      self
    end

[Validate]