Skip to content

Fix incompatibilities for on_word_sep in ripper#4089

Merged
kddnewton merged 1 commit intoruby:mainfrom
Earlopain:fixup-on-word-sep
Apr 23, 2026
Merged

Fix incompatibilities for on_word_sep in ripper#4089
kddnewton merged 1 commit intoruby:mainfrom
Earlopain:fixup-on-word-sep

Conversation

@Earlopain
Copy link
Copy Markdown
Collaborator

It was mostly good, just a few edgecases:

  • word_sep always only contains a single line. If there are multiple lines, it is also multiple word_sep
  • Handle trailing whitespace

The excluded testcase is interpolation mixed with heredoc. That is not currently handled properly and word_sep contains the content of the heredoc

I also switched start/end_offset names in the method, they seem to be backwards

It was mostly good, just a few edgecases:
* word_sep always only contains a single line. if there are multiple lines, it is also multiple word_sep
* Handle trailing whitespace

The excluded testcase is interpolation mixed with heredoc.
That is not currently handled properly and word_sep contains
the content of the heredoc

I also switched start/end_offset names in the method, they seem to be backwards
@kddnewton kddnewton merged commit f542074 into ruby:main Apr 23, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants