1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/bigdecimal/test_bigdecimal.rb: Use BigDecimal()

instead of deprecated BigDecimal.new.
This commit is contained in:
Yusuke Endoh 2019-09-22 11:55:00 +09:00
parent a0ce0b6297
commit b4c328bebc

View file

@ -54,7 +54,7 @@ class TestBigDecimal < Test::Unit::TestCase
assert_equal(111, BigDecimal("1_1_1_"))
assert_equal(10**(-1), BigDecimal("1E-1"), '#4825')
assert_equal(1234, BigDecimal(" \t\n\r \r1234 \t\n\r \r"))
bd = BigDecimal.new("1.12", 1)
bd = BigDecimal("1.12", 1)
assert_same(bd, BigDecimal(bd))
assert_same(bd, BigDecimal(bd, exception: false))
assert_not_same(bd, BigDecimal(bd, 1))