summaryrefslogtreecommitdiff
path: root/test/json/test_json_addition.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/json/test_json_addition.rb')
-rwxr-xr-xtest/json/test_json_addition.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/json/test_json_addition.rb b/test/json/test_json_addition.rb
index a8181e8d74f..f28f228c22c 100755
--- a/test/json/test_json_addition.rb
+++ b/test/json/test_json_addition.rb
@@ -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