Sha256: b8e9829d4075a9646e2175991187b862a2c6091a25e2ee931cce64b055c73672

Contents?: true

Size: 472 Bytes

Versions: 46

Compression:

Stored size: 472 Bytes

Contents

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

46 entries across 46 versions & 9 rubygems

Version Path
activesupport-2.0.2 lib/active_support/core_ext/duplicable.rb
activesupport-2.1.1 lib/active_support/core_ext/duplicable.rb
activesupport-2.0.4 lib/active_support/core_ext/duplicable.rb
activesupport-2.0.5 lib/active_support/core_ext/duplicable.rb
activesupport-2.1.0 lib/active_support/core_ext/duplicable.rb
activesupport-2.1.2 lib/active_support/core_ext/duplicable.rb
antfarm-0.3.0 rails/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
antfarm-0.4.0 rails/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.6.5.1 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.6.5 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.6.6 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.6.7 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.6.9 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.6.8 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.7.0 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.7.1 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
spree-0.0.9 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
spree-0.2.0 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
swivel-0.0.150 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb
swivel-0.0.149 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb