From a7e3516ff1116a15b3ed62f55143eceee27c4ce9 Mon Sep 17 00:00:00 2001 From: mrkn Date: Sun, 2 Dec 2018 05:21:57 +0000 Subject: Fix JSON::Parser against bigdecimal updates git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/json/json_parser_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/json/json_parser_test.rb b/test/json/json_parser_test.rb index 5f454eb121..68aeb572bb 100644 --- a/test/json/json_parser_test.rb +++ b/test/json/json_parser_test.rb @@ -110,8 +110,8 @@ class JSONParserTest < Test::Unit::TestCase end def test_parse_bigdecimals - assert_equal(BigDecimal, JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"].class) - assert_equal(BigDecimal.new("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] ) + assert_equal(BigDecimal, JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"].class) + assert_equal(BigDecimal("0.901234567890123456789E1"),JSON.parse('{"foo": 9.01234567890123456789}', decimal_class: BigDecimal)["foo"] ) end if Array.method_defined?(:permutation) -- cgit v1.2.3