From efa7a36b3c151bf958b92ebb714a2c98fe4d5ebe Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Mon, 5 Oct 2009 16:45:38 -0700 Subject: fixing rational strings --- lib/psych/visitors/to_ruby.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') 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 -- cgit v1.2.3