Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7
-
Fix Version/s: JRuby 1.7.0.pre2
-
Component/s: Ruby 1.8.7, Ruby 1.9.2, Standard Library
-
Number of attachments :
Description
YAML.parse cannot strip trailing tabs from String values.
1.8 mode:
Unable to find source-code formatter for language: ruby. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
YAML.load("key: 10\t\t#comment") # => {"key"=>"10\t\t#comment"}
1.9 mode:
Unable to find source-code formatter for language: ruby. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
YAML.load("key: 10\t\t#comment") ArgumentError: syntax error in "<reader>", line 1, column 8: key: 10 #comment ^ from org/jruby/ext/psych/PsychParser.java:279:in `parse' from /usr/local/jruby-1.6.7.2/lib/ruby/1.9/psych.rb:148:in `parse_stream' from /usr/local/jruby-1.6.7.2/lib/ruby/1.9/psych.rb:119:in `parse' from /usr/local/jruby-1.6.7.2/lib/ruby/1.9/psych.rb:106:in `load' from (irb):2:in `evaluate' from org/jruby/RubyKernel.java:1088:in `eval' from org/jruby/RubyKernel.java:1410:in `loop' from org/jruby/RubyKernel.java:1197:in `catch' from org/jruby/RubyKernel.java:1197:in `catch' from /usr/local/jruby-1.6.7.2/bin/irb:13:in `(root)'
This might be a duplicate of
JRUBY-6269.It is fixed on the master:
$ jruby -v; jruby -ryaml -e 'p YAML.load("key: 10\t\t#comment")' jruby 1.7.0.preview2 (1.9.3p203) 2012-08-22 ff42564 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_04-b21 [darwin-x86_64] {"key"=>10}If you want it fixed on the 1.6 branch, we'll need your help with the patch. (It might be as easy as updating SnakeYAML.)