Skip to content

Conversation

@kou
Copy link
Member

@kou kou commented Mar 25, 2025

Fix GH-145

MatchData#named_captures use the last matched value for each name.

Reported by Linus Sellberg. Thanks!!!

@kou kou force-pushed the named-captures-multiple branch from fb543d0 to c048c62 Compare March 25, 2025 01:21
Fix GH-145

`MatchData#named_captures` use the last matched value for each name.

Reported by Linus Sellberg. Thanks!!!
@kou kou force-pushed the named-captures-multiple branch from c048c62 to d54c39a Compare March 25, 2025 01:37
@byroot
Copy link
Member

byroot commented Apr 28, 2025

Also fixes: https://bugs.ruby-lang.org/issues/21288

@kou
Copy link
Member Author

kou commented Apr 28, 2025

Oh, I forgot to merge this...

@kou kou merged commit a6086ea into master Apr 28, 2025
76 checks passed
@kou kou deleted the named-captures-multiple branch April 28, 2025 22:17
matzbot pushed a commit to ruby/ruby that referenced this pull request May 2, 2025
MatchData#named_captures
(ruby/strscan#146)

Fix ruby/strscan#145

`MatchData#named_captures` use the last matched value for each name.

Reported by Linus Sellberg. Thanks!!!

ruby/strscan@a6086ea322
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.

#named_captures with regexp union does not match regexp.match behavior

3 participants