Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mjc opened this Issue · 1 comment

2 participants

@mjc

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
Owner

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
@headius headius added the stdlib label
@headius headius added this to the JRuby 9000 milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.