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
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/core_ext/duplicable.rb
activesupport-2.0.0 lib/active_support/core_ext/duplicable.rb
activesupport-2.0.1 lib/active_support/core_ext/duplicable.rb