Sha256: f06a734235fb1d81fb117710636a1030c0eebc779ef8090039800a815c602406

Contents?: true

Size: 532 Bytes

Versions: 178

Compression:

Stored size: 532 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

class Class #:nodoc:
  def duplicable?
    false
  end
end

Version data entries

178 entries across 145 versions & 25 rubygems

Version Path
maiha-dsl_accessor-0.3.1 core_ext/duplicable.rb
maiha-dsl_accessor-0.3.2 core_ext/duplicable.rb
maiha-dsl_accessor-0.3.3 core_ext/duplicable.rb
p8-castronaut-0.6.1.1 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.6.0 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.6.1 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.7.4 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
relevance-castronaut-0.7.5 vendor/activesupport/lib/active_support/core_ext/duplicable.rb
depengine-0.0.31 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.31 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.30 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.30 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.29 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.29 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.28 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.28 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.27 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.27 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.26 etc/isolate/jruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb
depengine-0.0.26 etc/isolate/ruby-1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/duplicable.rb