Sha256: a653c830a52329a11f89284bee8943b98b4c5c4c60eaf9655dc5d032e5be1fdb
Contents?: true
Size: 624 Bytes
Versions: 11
Compression:
Stored size: 624 Bytes
Contents
# = Duplicable # # This is not a mixin, since nearly all objects have this baehavior. # # Is this the same as immutable? Whould that be a better name? class Object # Can you safely .dup this object? # False for nil, false, true, symbols, and numbers; true otherwise. def duplicable? true end end class NilClass #:nodoc: def duplicable? false end end class FalseClass #:nodoc: def duplicable? false end end class TrueClass #:nodoc: def duplicable? false end end class Symbol #:nodoc: def duplicable? false end end class Numeric #:nodoc: def duplicable? false end end
Version data entries
11 entries across 11 versions & 2 rubygems