Issue #1873 has been updated by ko1 (Koichi Sasada).

Target version changed from 2.0.0 to next minor

I changed the target to "next minor" because no discussion there.

----------------------------------------
Feature #1873: MatchData#[]: Omits All But Last Captures Corresponding to the Same Named Group
https://bugs.ruby-lang.org/issues/1873#change-31629

Author: runpaint (Run Paint Run Run)
Status: Feedback
Priority: Normal
Assignee: naruse (Yui NARUSE)
Category: core
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(/(?<f>oo)(?<f>d)/)
   => #<MatchData "ood" f:"oo" f:"d">
   >> m[:f]
   => "d"
   >> m.to_a
   => ["ood", "oo", "d"]
=end



-- 
http://bugs.ruby-lang.org/