diff options
author | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-02 05:21:57 +0000 |
---|---|---|
committer | mrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-02 05:21:57 +0000 |
commit | a7e3516ff1116a15b3ed62f55143eceee27c4ce9 (patch) | |
tree | 07d24f899726bcfbf1dbeb5c93236f280b477488 /test/json/json_parser_test.rb | |
parent | e021386e905b6d6799a84dfbc2f0592e42626366 (diff) | |
download | ruby-a7e3516ff1116a15b3ed62f55143eceee27c4ce9.tar.gz |
Fix JSON::Parser against bigdecimal updates
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/json/json_parser_test.rb')
-rw-r--r-- | test/json/json_parser_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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) |