summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-10-05 16:45:38 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-10-05 16:45:38 -0700
commitefa7a36b3c151bf958b92ebb714a2c98fe4d5ebe (patch)
treeb77e5647bc0a20e9085d560f95082f1dee20c308 /lib
parenta5aa707138e05d42b7448c1ab2e229ac887506e5 (diff)
downloadpsych-efa7a36b3c151bf958b92ebb714a2c98fe4d5ebe.zip
fixing rational strings
Diffstat (limited to 'lib')
-rw-r--r--lib/psych/visitors/to_ruby.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb
index 7cfe333..6aea934 100644
--- a/lib/psych/visitors/to_ruby.rb
+++ b/lib/psych/visitors/to_ruby.rb
@@ -15,6 +15,7 @@ module Psych
return o.value if ['!str', 'tag:yaml.org,2002:str'].include?(o.tag)
return Complex(o.value) if o.tag == "!ruby/object:Complex"
+ return Rational(o.value) if o.tag == "!ruby/object:Rational"
return o.value if o.quoted
token = ScalarScanner.new(o.value).tokenize