Details

    • Number of attachments :
      0

      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)'
      

        Activity

        Hide
        Hiro Asari added a comment -

        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.)

        Show
        Hiro Asari added a comment - 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.)
        Hide
        Charles Oliver Nutter added a comment -

        Calling this fixed as of pre2. We'd happily incorporate a backported patch for JRuby 1.6.8, if it arrives soon.

        Show
        Charles Oliver Nutter added a comment - Calling this fixed as of pre2. We'd happily incorporate a backported patch for JRuby 1.6.8, if it arrives soon.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Postmodern
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: