Sha256: 7d9775ee1434d8fa2b1cc40b463ec391939e67d91cb3f223e6e27d9aa826588e

Contents?: true

Size: 221 Bytes

Versions: 15

Compression:

Stored size: 221 Bytes

Contents

module Ardm
  module Ext
    def self.try_dup(value)
      case value
      when ::TrueClass, ::FalseClass, ::NilClass, ::Module, ::Numeric, ::Symbol
        value
      else
        value.dup
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ardm-0.4.0.ar427 lib/ardm/support/ext/try_dup.rb
ardm-0.4.0 lib/ardm/support/ext/try_dup.rb
ardm-0.3.2 lib/ardm/support/ext/try_dup.rb
ardm-0.3.1 lib/ardm/support/ext/try_dup.rb
ardm-0.3.0 lib/ardm/support/ext/try_dup.rb
ardm-0.2.7 lib/ardm/support/ext/try_dup.rb
ardm-0.2.6 lib/ardm/support/ext/try_dup.rb
ardm-0.2.5 lib/ardm/support/ext/try_dup.rb
ardm-0.2.4 lib/ardm/support/ext/try_dup.rb
ardm-0.2.3 lib/ardm/support/ext/try_dup.rb
ardm-0.2.2 lib/ardm/support/ext/try_dup.rb
ardm-0.2.1 lib/ardm/support/ext/try_dup.rb
ardm-0.2.0 lib/ardm/support/ext/try_dup.rb
ardm-0.1.0 lib/ardm/support/ext/try_dup.rb
ardm-0.0.1 lib/ardm/support/ext/try_dup.rb