提交 d1630c38 编写于 作者: J Julio Lopez

improve duplicable documentation [ci skip]

上级 eb10496a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册