squiggly heredoc with single quotes fails to run #4169

Closed
personnel opened this Issue Sep 22, 2016 · 1 comment

Projects

None yet

2 participants

@personnel

test code:

obj = <<~'TEST'
    hello
TEST

puts obj

report error:

Unhandled Java exception: java.lang.ClassCastException: org.jruby.util.ByteList cannot be cast to org.jruby.ast.Node
java.lang.ClassCastException: org.jruby.util.ByteList cannot be cast to org.jruby.ast.Node
                     execute at org/jruby/parser/RubyParser.java:4501
                     yyparse at org/jruby/parser/RubyParser.java:1678
                     yyparse at org/jruby/parser/RubyParser.java:1569
                       parse at org/jruby/parser/RubyParser.java:5359
                       parse at org/jruby/parser/Parser.java:121
                       parse at org/jruby/parser/Parser.java:103
          parseFileAndGetAST at org/jruby/Ruby.java:2772
  parseFileFromMainAndGetAST at org/jruby/Ruby.java:2765
           parseFileFromMain at org/jruby/Ruby.java:2753
               parseFromMain at org/jruby/Ruby.java:613
                 runFromMain at org/jruby/Ruby.java:559
               doRunFromMain at org/jruby/Main.java:425
                 internalRun at org/jruby/Main.java:313
                         run at org/jruby/Main.java:242
                        main at org/jruby/Main.java:204

but <<~TEST or <<~"TEST" both ok.

Environment

  • jruby 9.1.5.0 (2.3.1) 2016-09-07 036ce39 Java HotSpot(TM) Client VM 25.101-b13 on 1.8.0_101-b13 +jit [mswin32-x86]
  • Windows 10 x64
@headius
Member
headius commented Sep 22, 2016

Nice.

@headius headius added this to the JRuby 9.1.6.0 milestone Sep 22, 2016
@enebo enebo closed this in 9bbcd84 Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment