Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.4
-
Fix Version/s: JRuby 1.5
-
Component/s: Extensions
-
Labels:None
-
Number of attachments :
Description
jruby -ryaml -e "p YAML.load_file('config_yaml_spec.rb')"
String.java:397:in `checkBounds': java.lang.StringIndexOutOfBoundsException: String index out of range: -1
from String.java:442:in `<init>'
from RubyErrHandler.java:28:in `handle'
from TokenScanner.java:19:in `error'
from DefaultYAMLParser.java:803:in `yyerror'
from DefaultYAMLParser.java:329:in `yyparse'
from Parser.java:290:in `yechtparse'
from Parser.java:284:in `parse'
from YParser.java:152:in `load'
from org/yecht/ruby/YParser$s_method_0_1$RUBYINVOKER$load.gen:-1:in `call'
from JavaMethod.java:631:in `call'
from DynamicMethod.java:186:in `call'
from CachingCallSite.java:309:in `cacheAndCall'
from CachingCallSite.java:148:in `call'
from CallOneArgNode.java:57:in `interpret'
from LocalAsgnNode.java:123:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:171:in `call'
from CachingCallSite.java:309:in `cacheAndCall'
from CachingCallSite.java:148:in `call'
from FCallOneArgNode.java:36:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedBlock.java:317:in `evalBlockBody'
from InterpretedBlock.java:268:in `yield'
from Block.java:194:in `yield'
from RubyIO.java:1092:in `open'
from org/jruby/RubyIO$s_method_0_2$RUBYFRAMEDINVOKER$open.gen:-1:in `call'
from DynamicMethod.java:190:in `call'
from CachingCallSite.java:319:in `cacheAndCall'
from CachingCallSite.java:157:in `callBlock'
from CachingCallSite.java:162:in `call'
from CallOneArgBlockNode.java:60:in `interpret'
from NewlineNode.java:104:in `interpret'
from InterpretedMethod.java:173:in `call'
from DefaultMethod.java:171:in `call'
from CachingCallSite.java:309:in `cacheAndCall'
from CachingCallSite.java:148:in `call'
from -e:1:in `__file__'
from -e:-1:in `load'
from Ruby.java:632:in `runScript'
from Ruby.java:550:in `runNormally'
from Ruby.java:396:in `runFromMain'
from Main.java:272:in `run'
from Main.java:117:in `run'
from Main.java:97:in `main'
Here's a simple fix, attached.