Commit graph

6 commits

Author SHA1 Message Date
Kevin Newton
439f069b4b [ruby/yarp] Move tests from test/* to test/yarp/* to match CRuby
This should make it easier on the sync to determine what changed
and hopefully result in fewer merge conflicts that have to be
manually resolved.

17d82afbfc
2023-08-25 21:15:49 +00:00
Mike Dalessio
20927a89c2 [ruby/yarp] Improve handling of line endings
Introduce three new inline helper functions:

- `match_line_ending`
- `match_line_ending_at`
- `match_line_ending_addr`

These functions are similar in signature to the `peek*` functions, but
return the length of the line ending being inspected (or 0 if no line
ending was found).

These functions are then used to simplify how we're detecting line
endings throughout "src/yarp.c".

Also:
- test coverage backfilled for `__END__` comments with CRLF line endings.
- error message for invalid `%` tokens updated to not include
  the potential line endings.
- some small refactorings for readability along the way

a00067386d
2023-08-24 13:45:29 +00:00
Mike Dalessio
9c43ec621d [ruby/yarp] fix: newline tracking for a comment at EOF
62fb0bddf5
2023-08-23 15:42:20 +00:00
Benoit Daloze
3536cad902 [ruby/yarp] Fixes so bundle exec rake can run on JRuby and TruffleRuby
e6cea4fa08
2023-08-16 17:47:32 -07:00
Haldun Bayhantopcu
bd5cc4d6a0 [ruby/yarp] Add comments test
6484af4165
2023-07-26 14:46:18 +00:00
Jemma Issroff
cc7f765f2c [Feature #19741] Sync all files in yarp
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
2023-06-21 11:25:39 -07:00