mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix JSON::Parser against bigdecimal updates
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e021386e90
commit
a7e3516ff1
3 changed files with 44 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue