Permalink
Browse files

improve duplicable documentation [ci skip]

  • Loading branch information...
piscolomo committed Jul 10, 2015
1 parent eb10496 commit d1630c38b30de37e8936e103a137e9c5d3381f21
Showing with 5 additions and 1 deletion.
  1. +5 −1 activesupport/lib/active_support/core_ext/object/duplicable.rb
@@ -19,7 +19,7 @@
class Object
# Can you safely dup this object?
#
# False for +nil+, +false+, +true+, symbol, number objects;
# False for +nil+, +false+, +true+, symbol, number, method objects;
# true otherwise.
def duplicable?
true
@@ -78,6 +78,10 @@ def duplicable?
require 'bigdecimal'
class BigDecimal
# BigDecimals are duplicable:
#
# BigDecimal.new("1.2").duplicable? # => true
# BigDecimal.new("1.2").dup # => #<BigDecimal:7f9d698eee10,'0.12E1',18(18)>
def duplicable?
true
end

0 comments on commit d1630c3

Please sign in to comment.