1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).

[Bug #5173] [ruby-core:38866]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-08-30 02:23:12 +00:00
parent 2dd9d721ed
commit b14c060dda
13 changed files with 728 additions and 288 deletions

View file

@ -164,4 +164,9 @@ class TC_JSONAddition < Test::Unit::TestCase
d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24))
assert_equal d, JSON.parse(d.to_json)
end
def test_rational_complex
assert_equal Rational(2, 9), JSON(JSON(Rational(2, 9)))
assert_equal Complex(2, 9), JSON(JSON(Complex(2, 9)))
end
end