diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2009-10-05 16:45:38 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2009-10-05 16:45:38 -0700 |
commit | efa7a36b3c151bf958b92ebb714a2c98fe4d5ebe (patch) | |
tree | b77e5647bc0a20e9085d560f95082f1dee20c308 /test/visitors | |
parent | a5aa707138e05d42b7448c1ab2e229ac887506e5 (diff) | |
download | psych-efa7a36b3c151bf958b92ebb714a2c98fe4d5ebe.zip |
fixing rational strings
Diffstat (limited to 'test/visitors')
-rw-r--r-- | test/visitors/test_to_ruby.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb index 3cb1ead..63a5006 100644 --- a/test/visitors/test_to_ruby.rb +++ b/test/visitors/test_to_ruby.rb @@ -45,6 +45,11 @@ module Psych node = Nodes::Scalar.new '3+4i', nil, "!ruby/object:Complex" assert_equal Complex(3, 4), node.to_ruby end + + def test_rational_string + node = Nodes::Scalar.new '1/2', nil, "!ruby/object:Rational" + assert_equal Rational(1, 2), node.to_ruby + end end def test_integer |