Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.0.0RC2
-
Fix Version/s: JRuby 1.0.0RC3
-
Component/s: Core Classes/Modules
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
The YAML parser fails when loading the attached file which comes from redMine. It's Japanese text, so maybe it isn't supported yet?
The code:
require 'yaml'
raw_hash = YAML::load(File.read('ja.yml'))
The error:
ParserImpl.java:496:in `org.jvyamlb.ParserImpl$26.produce': org.jvyamlb.ParserException: ParserException while scanning a block mapping we had this expected <block end>, but found org.jvyamlb.tokens.ScalarToken (NativeException)
from ParserImpl.java:823:in `org.jvyamlb.ParserImpl.parseStreamNext'
from ParserImpl.java:774:in `org.jvyamlb.ParserImpl.peekEvent'
from ComposerImpl.java:161:in `org.jvyamlb.ComposerImpl.composeNode'
from ComposerImpl.java:100:in `org.jvyamlb.ComposerImpl.composeDocument'
from ComposerImpl.java:76:in `org.jvyamlb.ComposerImpl.getNode'
from BaseConstructorImpl.java:97:in `org.jvyamlb.BaseConstructorImpl.getData'
from RubyYAML.java:221:in `org.jruby.RubyYAML.load'
from null:-1:in `org.jruby.RubyYAMLInvokerSload1.call'
... 48 levels...
from Main.java:190:in `org.jruby.Main.runInterpreter'
from Main.java:120:in `org.jruby.Main.run'
from Main.java:95:in `org.jruby.Main.main'
Complete Java stackTrace
while scanning a block mapping
expected <block end>, but found org.jvyamlb.tokens.ScalarToken
org.jvyamlb.ParserException: ParserException while scanning a block mapping we had this expected <block end>, but found org.jvyamlb.tokens.ScalarToken
at org.jvyamlb.ParserImpl$26.produce(ParserImpl.java:496)
at org.jvyamlb.ParserImpl.parseStreamNext(ParserImpl.java:823)
at org.jvyamlb.ParserImpl.peekEvent(ParserImpl.java:774)
at org.jvyamlb.ComposerImpl.composeNode(ComposerImpl.java:161)
at org.jvyamlb.ComposerImpl.composeDocument(ComposerImpl.java:100)
at org.jvyamlb.ComposerImpl.getNode(ComposerImpl.java:76)
at org.jvyamlb.BaseConstructorImpl.getData(BaseConstructorImpl.java:97)
at org.jruby.RubyYAML.load(RubyYAML.java:221)
at org.jruby.RubyYAMLInvokerSload1.call(Unknown Source)
at org.jruby.runtime.callback.FastInvocationCallback.execute(FastInvocationCallback.java:49)
at org.jruby.internal.runtime.methods.SimpleCallbackMethod.call(SimpleCallbackMethod.java:81)
at org.jruby.RubyObject.compilerCallMethod(RubyObject.java:510)
at org.jruby.javasupport.util.CompilerHelpers.doInvokeDynamic(CompilerHelpers.java:123)
at EVAL8970973._file_(EVAL8970973:2)
at EVAL8970973.run(EVAL8970973)
at org.jruby.Ruby.compileOrFallbackAndRun(Ruby.java:306)
at org.jruby.Main.runInterpreter(Main.java:233)
at org.jruby.Main.runInterpreter(Main.java:190)
at org.jruby.Main.run(Main.java:120)
at org.jruby.Main.main(Main.java:95)
Also fails with the attached zh.yml, for what that's worth.