From: mame@... Date: 2017-10-20T01:27:57+00:00 Subject: [ruby-core:83409] [Ruby trunk Feature#1873][Rejected] MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group Issue #1873 has been updated by mame (Yusuke Endoh). Status changed from Feedback to Rejected The discussion has been stalled. It seems the feature itself looks good (note that matz has not said his opinion, thoguh). Anyway, the name matters. Please reopen or create a new ticket if you come up with a good name for the method. ---------------------------------------- Feature #1873: MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group https://bugs.ruby-lang.org/issues/1873#change-67374 * Author: runpaint (Run Paint Run Run) * Status: Rejected * Priority: Normal * Assignee: naruse (Yui NARUSE) * Target version: next minor ---------------------------------------- =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 ---Files-------------------------------- re_named_values_at.patch.gz (1015 Bytes) re_all_values.patch.gz (1.39 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: