Rails Routing - what's this do?

Does anyone know what the point of the following bit of code (from
routing.rb) does?

class Regexp #:nodoc:
def number_of_captures

Does this not always return 0, since there are no captures when
matching ‘’ to ‘’?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs