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

Already on GitHub? Sign in to your account

Make yaml to handle anchor aliased class correctly #629

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

awakia commented Feb 19, 2014

Currently, since psych_ext is based on old psych, aliased class is not loaded correctly.
See example below:

$ pry 
[1] pry(main)> require 'yaml'
=> true
[2] pry(main)> YAML.load("created_at: &1 2014-02-19 15:19:41.842913000 +09:00\nupdated_at: *1\n")
=> {"created_at"=>2014-02-19 15:19:41 +0900,
 "updated_at"=>2014-02-19 15:19:41 +0900}
[3] pry(main)> require 'delayed_job'
=> true
[4] pry(main)> YAML.load("created_at: &1 2014-02-19 15:19:41.842913000 +09:00\nupdated_at: *1\n")
=> {"created_at"=>2014-02-19 15:19:41 +0900,
 "updated_at"=>"2014-02-19 15:19:41.842913000 +09:00"}

I know edited lines are solving the issue of default implementation change of YAML during ruby 1.9.2/1.9.3 generation. 14cfa87

But current code of psych does not seem to cause such issue. Please refer the current psych and review this pull request :-)

Current source of psych:
https://github.com/tenderlove/psych/blob/master/lib/psych/visitors/yaml_tree.rb
https://github.com/tenderlove/psych/blob/master/lib/psych/visitors/to_ruby.rb

awakia commented Feb 27, 2014

Can anyone help for this issue?
I tried to resolve this yaml decoding issue, but seems to be failed...

Owner

albus522 commented Sep 19, 2014

This does not appear to still be an issue

@albus522 albus522 closed this Sep 19, 2014

I had the same problem using delayed_job v3.0.5 on ruby 2.1, upgrading to the last version 4.0.4 solve the issue

awakia commented Oct 3, 2014

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment