From: "erikh (Erik Hollensbe)" Date: 2012-04-11T18:34:23+09:00 Subject: [ruby-core:44286] [ruby-trunk - Feature #1873] MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group Issue #1873 has been updated by erikh (Erik Hollensbe). File re_all_values.patch.gz added I've attached a new patch -- this implements the same functionality but refers to it as `all_values` and reverts the old changes to `values_at`. This is fundamentally the same functionality as `values_at` with the overridden functionality described in the ticket. Sorry for the latency on this, it's been a crazy few years. :) Tests pass, including the new ones. ---------------------------------------- Feature #1873: MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group https://bugs.ruby-lang.org/issues/1873#change-25827 Author: runpaint (Run Paint Run Run) Status: Feedback Priority: Normal Assignee: naruse (Yui NARUSE) Category: core Target version: 2.0.0 =begin I suspect that MatchData#[:symbol] should return an Array of values when the same named group has been matched multiple times. >> m = 'food'.match(/(?oo)(?d)/) => # >> m[:f] => "d" >> m.to_a => ["ood", "oo", "d"] =end -- http://bugs.ruby-lang.org/