psych can not load yaml file from classloader #3306

Closed
mkristian opened this Issue Sep 3, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@mkristian
Member

mkristian commented Sep 3, 2015

setup:

$ echo asd > a.yml

then

$ java -cp .:jruby-complete-1.7.22.jar org.jruby.Main -ryaml -e 'p YAML.load_file("uri:classloader:/a.yml")'
false

but

$ java -cp .:jruby-complete-1.7.22.jar org.jruby.Main -ryaml -e 'p YAML.load(File.read("uri:classloader:/a.yml"))'
"asd"

or

$ java -cp .:jruby-complete-1.7.22.jar org.jruby.Main -ryaml -e 'p YAML.load_file("classpath:/a.yml")'
"asd"

or

$ java -cp .:jruby-complete-9.0.1.0.jar org.jruby.Main -ryaml -e 'p YAML.load_file("uri:classloader:/a.yml")'
"asd"

so it is only the uri:classloader:/a.yml which fails on jruby-1.7.x.
jruby-9k works.

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