Feature #966
String#[] should accept (Regexp, String) args so named groups can be used
| Status: | Closed | Start date: | 01/02/2009 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | core | |||
| Target version: | 1.9.2 |
Description
as obvious as: "foo"[/(?<bar>foo)/, "bar"]
Related issues
| duplicated by ruby-trunk - Feature #2778: Regular Expression Named Group Matching does not work wit... | Closed | 02/22/2010 |
Associated revisions
* string.c (rb_str_subpat): accept capture name.
(rb_str_aref): follow above change.
(rb_str_aref_m): pass the 2nd argument to rb_str_subpat.
(rb_str_subpat_set): accept capture name.
(rb_str_aset): follow above change.
(rb_str_partition): ditto.
(rb_str_aset_m): pass the 2nd argument to rb_str_subpat_set.
* include/ruby/intern.h (rb_reg_backref_number): declared.
* re.c (rb_reg_backref_number): defined.
[ruby-core:21057]
History
Updated by Koichi Sasada about 3 years ago
- Assignee set to Akira Tanaka
- Target version set to 1.9.2
Updated by Akira Tanaka almost 3 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r22959.