Forum: Ruby on Rails Routing question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B29827838126aaaf080325b3f241e496?d=identicon&s=25 RailsToPerl (Guest)
on 2007-05-21 21:12
(Received via mailing list)
In routing.rb, what is the purpose of the following piece of code:

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

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.
This topic is locked and can not be replied to.