Skip to content

Commit 7c6cbe2

Browse files
committed
[test] avoid BigDecimal.new deprecation on Ruby 2.5
1 parent 21880fe commit 7c6cbe2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/json_parser_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def test_parse_numbers
110110
end
111111

112112
def test_parse_bigdecimals
113-
assert_equal(BigDecimal, JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"].class)
114-
assert_equal(BigDecimal.new("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] )
113+
assert_equal(BigDecimal, JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"].class)
114+
assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] )
115115
end
116116

117117
if Array.method_defined?(:permutation)

0 commit comments

Comments
 (0)