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

YAML parsing on master fails when loading currency gem data #1815

mjc opened this Issue Jul 15, 2014 · 1 comment


None yet
2 participants

mjc commented Jul 15, 2014

On revision c12de36, this gist (https://gist.github.com/mjc/25e4b894160732b6cc31) fails with this exception:

Exception `Psych::SyntaxError' at org/jruby/ext/psych/PsychParser.java:215 - (iso4217.yaml): mapping values are not allowed here at line 2 column 7
Psych::SyntaxError: (iso4217.yaml): mapping values are not allowed here at line 2 column 7
         parse at org/jruby/ext/psych/PsychParser.java:215
  parse_stream at /Users/mjc/.rubies/jruby-head/lib/ruby/2.1/psych.rb:370
         parse at /Users/mjc/.rubies/jruby-head/lib/ruby/2.1/psych.rb:318
          load at /Users/mjc/.rubies/jruby-head/lib/ruby/2.1/psych.rb:245
     load_file at /Users/mjc/.rubies/jruby-head/lib/ruby/2.1/psych.rb:464
          open at org/jruby/RubyIO.java:1009
     load_file at /Users/mjc/.rubies/jruby-head/lib/ruby/2.1/psych.rb:464
        (root) at test.rb:3

The data comes from currency v0.4.2.


headius commented Sep 9, 2014

I think you're right...this is the same issue as #1824, manifested in a different way because the file being read is larger than the internal buffers. So you end up with half a YAML file trying to parse, leading to syntax errors.

I ran your example after 4768e02 and it works fine, so we'll call this one fixed too.

@headius headius closed this Sep 9, 2014

@headius headius added the stdlib label Sep 9, 2014

@headius headius added this to the JRuby 9000 milestone Sep 9, 2014

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