[ruby/strscan] named_captures: fix incompatibility with
commitaf6d6b64eafc8f9353804cd8c8192a2afed0d6e5
authorSutou Kouhei <[email protected]>
Mon, 28 Apr 2025 22:17:47 +0000 (29 07:17 +0900)
committerHiroshi SHIBATA <[email protected]>
Fri, 2 May 2025 00:52:38 +0000 (2 09:52 +0900)
tree8521cc6894b73a1734f279b1d5d4459a7e205930
parenta1e627b7e3a081a9ab52b04ef4a8e4930caa0cf2
[ruby/strscan] named_captures: fix incompatibility with
MatchData#named_captures
(https://github.com/ruby/strscan/pull/146)

Fix https://github.com/ruby/strscan/pull/145

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

Reported by Linus Sellberg. Thanks!!!

https://github.com/ruby/strscan/commit/a6086ea322
ext/strscan/strscan.c
test/strscan/test_stringscanner.rb