Permalink
Browse files

Merge pull request #28568 from y-yagi/fix_doc_format_for_duplicable

Fix doc format for `duplicable?` [ci skip]
  • Loading branch information...
kamipo committed Mar 25, 2017
2 parents 684de49 + af2e39f commit e341d835070c7ef9990f41e02bbf46536be0aee7
Showing with 6 additions and 6 deletions.
  1. +6 −6 activesupport/lib/active_support/core_ext/object/duplicable.rb
@@ -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

0 comments on commit e341d83

Please sign in to comment.