Routing question

In routing.rb, what is the purpose of the following piece of code:

class Regexp
def number_of_captures
Regexp.new("|#{source}").match(’’).captures.length
end

Does this method not always return 0? It’s always going to match ‘’
with the blank spot before the | and therefore will have no captures.