Sha256: 9be5a6063cd88e3062cfa8ad03ea077b18e29b1dffeb4a7d5ee890c888e01624
Contents?: true
Size: 607 Bytes
Versions: 1
Compression:
Stored size: 607 Bytes
Contents
require 'facets/kernel/try_dup' class Object # module Kernel ? # Can you safely call #dup on this object? # False for nil, false, true, symbols, and numbers; true otherwise. def dup? ; true ; end def clone? ; true ; end end class NilClass def dup? ; false ; end def clone? ; false ; end end class FalseClass def dup? ; false ; end def clone? ; false ; end end class TrueClass def dup? ; false ; end def clone? ; false ; end end class Symbol def dup? ; false ; end def clone? ; false ; end end class Numeric def dup? ; false ; end def clone? ; false ; end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-2.9.0.pre.1 | lib/core/facets/kernel/dup.rb |