Ripper's lexemes were slightly different in Ruby 3.2 for Heredocs.
We ignored this complex heredoc test in this case because
Ripper's output has changed
https://github.com/ruby/yarp/commit/59d3d4a899
* Sync YARP gemspec
We were previously not syncing the YARP gemspec over which meant
that the Ruby YARP gem was out of sync.
* Sync YARP node / lex_compat files
The problem was that we were treating heredoc bodies as part of the %W
list because we didn't push the scanning cursor past the heredoc after
lexing out the here doc. To fix this, we changed the whitespace
scanning function to quit scanning when it reaches a newline but only in
the case that a heredoc is present.
Additionally, we need to prevent double counting newlines in the case of
a heredoc. For example:
```ruby
%W(<<foo 123)
foo
```
The newline after the `)` is counted as part of scanning the heredoc, so
we added logic to prevent double counting the newline when scanning the
rest of the %W list.
https://github.com/ruby/yarp/commit/eb090d8126
Co-authored-by: Jemma Issroff <jemmaissroff@gmail.com>
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:
* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp