diff options
| author | Mike Dalessio <mike.dalessio@gmail.com> | 2023-08-23 11:39:15 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-08-24 13:45:29 +0000 |
| commit | 20927a89c27948be866a5667117326ea02690a7c (patch) | |
| tree | 3041c57349fad7b37d14f59b692dc33594a2e622 /lib/uri/https.rb | |
| parent | 5ec1fc52c1640c75899972ad99734ff22a90694a (diff) | |
[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
https://github.com/ruby/yarp/commit/a00067386d
Diffstat (limited to 'lib/uri/https.rb')
0 files changed, 0 insertions, 0 deletions
