aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/bigdecimal_test.rb
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2017-12-15 00:13:07 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2017-12-15 01:19:57 +0000
commite4a6a23aa77185127ce9609777820fab14a689bb (patch)
treee3123654767a935bb5e9feb32f5f27720525570c /activesupport/test/core_ext/bigdecimal_test.rb
parent36291970341057bbf5f818d5ee0c5e77ab14a308 (diff)
downloadrails-e4a6a23aa77185127ce9609777820fab14a689bb.tar.gz
rails-e4a6a23aa77185127ce9609777820fab14a689bb.tar.bz2
rails-e4a6a23aa77185127ce9609777820fab14a689bb.zip
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.
Diffstat (limited to 'activesupport/test/core_ext/bigdecimal_test.rb')
-rw-r--r--activesupport/test/core_ext/bigdecimal_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/bigdecimal_test.rb b/activesupport/test/core_ext/bigdecimal_test.rb
index 66e81f1162..62588be33b 100644
--- a/activesupport/test/core_ext/bigdecimal_test.rb
+++ b/activesupport/test/core_ext/bigdecimal_test.rb
@@ -5,7 +5,7 @@ require "active_support/core_ext/big_decimal"
class BigDecimalTest < ActiveSupport::TestCase
def test_to_s
- bd = BigDecimal.new "0.01"
+ bd = BigDecimal "0.01"
assert_equal "0.01", bd.to_s
assert_equal "+0.01", bd.to_s("+F")
assert_equal "+0.0 1", bd.to_s("+1F")