From 7b3d663b4d9e58c8bc6c13e2b0ef703af2063a21 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Sun, 15 Jan 2017 11:44:00 +0900 Subject: Several representation of BigDecimal has changed in Ruby 2.4.0+ [ci skip] cf. https://github.com/ruby/bigdecimal/pull/42 --- activesupport/lib/active_support/core_ext/object/duplicable.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/core_ext/object/duplicable.rb b/activesupport/lib/active_support/core_ext/object/duplicable.rb index ea81df2bd8..ed0df42b0a 100644 --- a/activesupport/lib/active_support/core_ext/object/duplicable.rb +++ b/activesupport/lib/active_support/core_ext/object/duplicable.rb @@ -107,6 +107,13 @@ class BigDecimal # BigDecimals are duplicable: # # BigDecimal.new("1.2").duplicable? # => true + # + # In Ruby 2.4.0: + # + # BigDecimal.new("1.2").dup # => 0.12e1 + # + # Whereas in Ruby 2.2 and 2.3: + # # BigDecimal.new("1.2").dup # => # def duplicable? true -- cgit v1.2.3