Sha256: 2d5aa9e64df4c1b9cf7e3594560c72596077ca3adff6a0a41a1c73660f944e01

Contents?: true

Size: 226 Bytes

Versions: 19

Compression:

Stored size: 226 Bytes

Contents

module Kernel

  # Anything that can be marshaled can be copied in totality.
  # This is also commonly called a deep_copy.
  #
  #   "ABC".copy  #=> "ABC"
  #
  def deep_copy
    Marshal::load(Marshal::dump(self))
  end

end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
facets-2.8.4 lib/core/facets/kernel/deep_copy.rb
facets-2.8.3 lib/core/facets/kernel/deep_copy.rb
facets-2.8.2 lib/core/facets/kernel/deep_copy.rb
facets-2.8.1 lib/core/facets/kernel/deep_copy.rb
facets-2.8.0 lib/core/facets/kernel/deep_copy.rb
facets-2.7.0 lib/core/facets/kernel/deep_copy.rb
facets-2.6.0 lib/core/facets/kernel/deep_copy.rb
clio-0.3.0 lib/clio/facets/kernel.rb
clio-0.2.0 lib/clio/facets/kernel.rb
facets-2.4.0 lib/facets/kernel/deep_copy.rb
facets-2.4.1 lib/facets/kernel/deep_copy.rb
facets-2.4.2 lib/core/facets/kernel/deep_copy.rb
facets-2.4.4 lib/core/facets/kernel/deep_copy.rb
facets-2.4.3 lib/core/facets/kernel/deep_copy.rb
facets-2.5.0 lib/core/facets/kernel/deep_copy.rb
facets-2.4.5 lib/core/facets/kernel/deep_copy.rb
facets-2.5.1 lib/core/facets/kernel/deep_copy.rb
facets-2.5.2 lib/core/facets/kernel/deep_copy.rb
mack-facets-0.8.2 lib/gems/facets-2.4.5/lib/core/facets/kernel/deep_copy.rb