`MatchData#captures` should return an array of strings, and `Array#<<` will append the given element to the array, so this will be `['/etc/yum.repos.d', '/etc/yum/repos.d', [matchdata]]`, if I understand this correctly. Is something else going on? Am I misunderstanding the behavior here?