Squiggly heredoc "<<~" unsupported
Closed this issue · 3 comments
phiggins commented
tobiashm commented
Parsing the following works (with 3.8.2)
puts <<~eos
Hello, World!
eos
But if you use parentheses, it fails
puts(<<~eos)
Hello, World!
eos
eoinkelly commented
Parsing the following fails in 3.8.2
# ./do_thing.rb
def do_thing
<<~EOM
Some content
EOM
end
with the error
[2] pry(main)> RubyParser.new.parse File.read("./do_thing.rb")
Racc::ParseError: (string):2 :: parse error on value "<<" (tLSHFT)
from /Users/eoinkelly/.rbenv/versions/2.3.1/lib/ruby/2.3.0/racc/parser.rb:528:in `on_error'