From e4a6a23aa77185127ce9609777820fab14a689bb Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Fri, 15 Dec 2017 00:13:07 +0000 Subject: Suppress `warning: BigDecimal.new is deprecated` `BigDecimal.new` has been deprecated in BigDecimal 1.3.3 which will be a default for Ruby 2.5. Refer https://github.com/ruby/bigdecimal/commit/533737338db915b00dc7168c3602e4b462b23503 * This commit has been made as follows: ``` cd rails git grep -l BigDecimal.new | grep -v guides/source/5_0_release_notes.md | grep -v activesupport/test/xml_mini_test.rb | xargs sed -i -e "s/BigDecimal.new/BigDecimal/g" ``` - `activesupport/test/xml_mini_test.rb` Editmanually to remove `.new` and `::` - guides/source/5_0_release_notes.md This is a Rails 5.0 release notes. --- guides/source/active_support_core_extensions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 66d2fbd939..8e2826bb85 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -1978,19 +1978,19 @@ Extensions to `BigDecimal` The method `to_s` provides a default specifier of "F". This means that a simple call to `to_s` will result in floating point representation instead of engineering notation: ```ruby -BigDecimal.new(5.00, 6).to_s # => "5.0" +BigDecimal(5.00, 6).to_s # => "5.0" ``` and that symbol specifiers are also supported: ```ruby -BigDecimal.new(5.00, 6).to_s(:db) # => "5.0" +BigDecimal(5.00, 6).to_s(:db) # => "5.0" ``` Engineering notation is still supported: ```ruby -BigDecimal.new(5.00, 6).to_s("e") # => "0.5E1" +BigDecimal(5.00, 6).to_s("e") # => "0.5E1" ``` Extensions to `Enumerable` -- cgit v1.2.3