YAML weirdness #474

glebm opened this Issue Jan 2, 2013 · 6 comments


None yet

4 participants


Update Turned out to be a Psych (pure ruby only, so works fine in MRI, but not jruby) bug, ticketed here ruby/psych#109
Close or keep open until fixed as you see fit!

jruby 1.7.1

> "1.".to_yaml
ArgumentError: invalid value for Float(): "1."
from org/jruby/RubyKernel.java:430:in `Float'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/lib/ruby/1.9/psych/scalar_scanner.rb:99:in `tokenize'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/lib/ruby/1.9/psych/visitors/yaml_tree.rb:246:in `visit_String'
from org/jruby/RubyBasicObject.java:1665:in `__send__'
from org/jruby/RubyKernel.java:2090:in `send'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/lib/ruby/1.9/psych/visitors/yaml_tree.rb:104:in `accept'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/lib/ruby/1.9/psych/visitors/yaml_tree.rb:68:in `push'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/lib/ruby/1.9/psych.rb:244:in `dump'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/lib/ruby/1.9/psych/core_ext.rb:14:in `psych_to_yaml'
from (irb):5:in `evaluate'
from org/jruby/RubyKernel.java:1066:in `eval'
from org/jruby/RubyKernel.java:1392:in `loop'
from org/jruby/RubyKernel.java:1174:in `catch'
from org/jruby/RubyKernel.java:1174:in `catch'
from /Users/glebm/.rvm/rubies/jruby-1.7.1/bin/irb:13:in `(root)'
@glebm glebm referenced this issue in ruby/psych Jan 2, 2013

"1.".to_yaml #109


Psych fixed by ruby/psych@cf82e48
Now jruby needs to be updated

JRuby Team member

We'll wait for the Psych release.


Just ran into this today.
Any news when this fix will be pulled into jruby?

@BanzaiMan BanzaiMan was assigned Apr 8, 2013
JRuby Team member

@rb2k We are waiting for the Psych release that contains the fix.


Ran into this when passing a hash, that contain keys ending with ".", as a parameter to delayed_job.

JRuby Team member
$ jruby -v -rpsych -e 'puts "1.".to_yaml'
jruby 1.7.5.dev (1.9.3p392) 2013-09-02 89101e0 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64]
--- '1.'
@BanzaiMan BanzaiMan closed this Sep 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment