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 --- guides/source/active_support_core_extensions.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'guides/source/active_support_core_extensions.md') diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index 67bed4c8da..b9f096b82a 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -1980,7 +1980,15 @@ and that symbol specifiers are also supported: BigDecimal.new(5.00, 6).to_s(:db) # => "5.0" ``` -Engineering notation is still supported: +Engineering notation is still supported. + +In Ruby 2.4: + +```ruby +BigDecimal.new(5.00, 6).to_s("e") # => "0.5e1" +``` + +Whereas in Ruby 2.2 and 2.3: ```ruby BigDecimal.new(5.00, 6).to_s("e") # => "0.5E1" -- cgit v1.2.3