提交 e341d835 编写于 作者: R Ryuta Kamizono 提交者: GitHub

Merge pull request #28568 from y-yagi/fix_doc_format_for_duplicable

Fix doc format for `duplicable?` [ci skip]
......@@ -106,8 +106,8 @@ def duplicable?
class BigDecimal
# BigDecimals are duplicable:
#
# BigDecimal.new("1.2").duplicable? # => true
# BigDecimal.new("1.2").dup # => #<BigDecimal:...,'0.12E1',18(18)>
# BigDecimal.new("1.2").duplicable? # => true
# BigDecimal.new("1.2").dup # => #<BigDecimal:...,'0.12E1',18(18)>
def duplicable?
true
end
......@@ -130,8 +130,8 @@ class Complex
# Complexes are not duplicable:
#
# Complex(1).duplicable? # => false
# Complex(1).dup # => TypeError: can't copy Complex
# Complex(1).duplicable? # => false
# Complex(1).dup # => TypeError: can't copy Complex
def duplicable?
false
end
......@@ -145,8 +145,8 @@ class Rational
# Rationals are not duplicable:
#
# Rational(1).duplicable? # => false
# Rational(1).dup # => TypeError: can't copy Rational
# Rational(1).duplicable? # => false
# Rational(1).dup # => TypeError: can't copy Rational
def duplicable?
false
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册