Forum: Ruby on Rails Rails Routing - what's this do?

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.
RailsToPerl (Guest)
on 2007-05-21 22:58
(Received via mailing list)
Does anyone know what the point of the following bit of code (from
routing.rb) does?

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

Does this not always return 0, since there are no captures when
matching '' to ''?
This topic is locked and can not be replied to.