aboutsummaryrefslogblamecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/duplicable.rb
blob: a2d4d50076a6e1f21a49c9ee105256dc4376f48f (plain) (tree)
1
2
3

                                    
                                                                                           

































                         





                    





                     
class Object
  # Can you safely .dup this object?
  # False for nil, false, true, symbols, numbers, class and module objects; 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

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