Flowdock
method

unoptionalize

Importance_0
v2.3.2 - Show latest stable - 0 notes - Class: Regexp
unoptionalize(pattern) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/routing/routing_ext.rb, line 42
    def unoptionalize(pattern)
      [/\A\(\?:(.*)\)\?\Z/, /\A(.|\(.*\))\?\Z/].each do |regexp|
        return $1 if regexp =~ pattern
      end
      return pattern
    end
Register or log in to add new notes.