summaryrefslogtreecommitdiff
path: root/tests/json_parser_test.rb
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-02 05:21:57 +0000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-10-31 13:22:54 +0900
commit04b2fcf7397bc0b684b00bd3c92184650432cbba (patch)
treeba8a5f6bfa39b0837c50201ee376c0753881b281 /tests/json_parser_test.rb
parentdcb35811cf240f771a0587ee20ec54b10594ff52 (diff)
downloadjson-04b2fcf7397bc0b684b00bd3c92184650432cbba.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 'tests/json_parser_test.rb')
-rw-r--r--tests/json_parser_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/json_parser_test.rb b/tests/json_parser_test.rb
index 469f93c..9946dd9 100644
--- a/tests/json_parser_test.rb
+++ b/tests/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)