$ ruby -v example.rb
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
example.rb:1: warning: possibly useless use of a literal in void context
example.rb: --> /tmp/h.rb
could not find a terminator for the heredoc
> 1 <<~''
Actual
Although the Parser gem is able to parse it, this is likely an unexpected behavior:
There is an incompatibility in syntax error between Parser gem and Ruby:
Expected
<<~''
has been a syntax error since at least Ruby 2.0:The same goes for Ruby 3.3:
Actual
Although the Parser gem is able to parse it, this is likely an unexpected behavior:
The same goes for
<<''
and<<-''
.