diff --git a/lib/rspec/matchers/built_in/match.rb b/lib/rspec/matchers/built_in/match.rb index 8f4d6e3e9..a082a3af5 100644 --- a/lib/rspec/matchers/built_in/match.rb +++ b/lib/rspec/matchers/built_in/match.rb @@ -52,7 +52,6 @@ def can_safely_call_match?(expected, actual) def match_captures(expected, actual) match = actual.match(expected) if match - match = MatchData.new(match) if match.names.empty? values_match?(@expected_captures, match.captures) else @@ -66,31 +65,6 @@ def match_captures(expected, actual) end end end - - # @private - class MatchData - def initialize(match_data) - @match_data = match_data - end - - # @api private - # Returns match data names for named captures - # @return Array - def names - match_data.names - end - - # @api private - # returns an array of captures from the match data - # @return Array - def captures - match_data.captures - end - - protected - - attr_reader :match_data - end end end end