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
swivel-0.0.160 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb
swivel-0.0.155 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb
swivel-0.0.157 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb
swivel-0.0.156 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb
swivel-0.0.152 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb
swivel-0.0.175 vendor/activesupport-2.0.2-/lib/active_support/core_ext/duplicable.rb