Commit 8cdfd11
committed
Widen StringScanner#[] to accept named-capture String/Symbol keys
`StringScanner#[]` accepts a capture-group name as a String or Symbol
in addition to an Integer index — the method's own RD doc in this file
documents and demonstrates it ("`specifier` symbol or string. returns
the named subgroup", with `scanner[:wday]` / `scanner['wday']`
examples). The signature only listed `Integer`, so named-capture
lookups type-check as an argument error.1 parent fa84359 commit 8cdfd11
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| |||
0 commit comments