summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-10-07 15:51:21 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-10-07 15:51:21 -0700
commit57c468a5f8bd3ffc1cb93b07db6b823872316a18 (patch)
treedad229aa55917b157c2eba2f76d9da3a7e947866 /lib
parent98ce58ac328aca5f5d541c9118b5e4184b916bd3 (diff)
downloadpsych-57c468a5f8bd3ffc1cb93b07db6b823872316a18.zip
fixing float parsing
Diffstat (limited to 'lib')
-rw-r--r--lib/psych/visitors/to_ruby.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb
index bb80ad6..c757d25 100644
--- a/lib/psych/visitors/to_ruby.rb
+++ b/lib/psych/visitors/to_ruby.rb
@@ -22,6 +22,8 @@ module Psych
Complex(o.value)
when "!ruby/object:Rational"
Rational(o.value)
+ when "tag:yaml.org,2002:float", "!float"
+ Float(ScalarScanner.new(o.value).tokenize.last)
when "!ruby/regexp"
o.value =~ /^\/(.*)\/([mix]*)$/
source = $1