Sha256: 56b7dabba5e1ed2de2a6deb690b420a4e5c162d1ac1c83c010d6f2a97b536079

Contents?: true

Size: 143 Bytes

Versions: 13

Compression:

Stored size: 143 Bytes

Contents

module Spruz
  module DeepDup
    def deep_dup
      Marshal.load(Marshal.dump(self))
    rescue TypeError
      return self
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spruz-0.2.13 lib/spruz/deep_dup.rb
spruz-0.2.12 lib/spruz/deep_dup.rb
spruz-0.2.11 lib/spruz/deep_dup.rb
spruz-0.2.10 lib/spruz/deep_dup.rb
spruz-0.2.9 lib/spruz/deep_dup.rb
spruz-0.2.8 lib/spruz/deep_dup.rb
spruz-0.2.7 lib/spruz/deep_dup.rb
spruz-0.2.6 lib/spruz/deep_dup.rb
spruz-0.2.5 lib/spruz/deep_dup.rb
spruz-0.2.2 lib/spruz/deep_dup.rb
spruz-0.2.1 lib/spruz/deep_dup.rb
spruz-0.2.0 lib/spruz/deep_dup.rb
spruz-0.1.5 lib/spruz/deep_dup.rb