Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML weirdness #474

Closed
glebm opened this Issue Jan 2, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@glebm
Copy link

glebm commented Jan 2, 2013

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 Jan 2, 2013

Closed

"1.".to_yaml #109

@glebm

This comment has been minimized.

Copy link
Author

glebm commented Jan 9, 2013

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

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Jan 9, 2013

We'll wait for the Psych release.

@rb2k

This comment has been minimized.

Copy link

rb2k commented Apr 7, 2013

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

@ghost ghost assigned BanzaiMan Apr 8, 2013

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Apr 8, 2013

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

@hithams

This comment has been minimized.

Copy link

hithams commented Apr 12, 2013

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

@BanzaiMan

This comment has been minimized.

Copy link
Member

BanzaiMan commented Sep 3, 2013

$ 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
You can’t perform that action at this time.