# File lib/routing_filter/filter.rb, line 21 def extract_segment!(pattern, path) path.sub!(pattern) { $2 || '' } path.replace('/') if path.empty? $1 end