1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Deal with :host condition special case first

Prevents a wrong number of args exception under 1.9
This commit is contained in:
Ryan Tomayko 2009-05-18 03:49:42 -07:00
parent c4843a0803
commit d7233ca8be

View file

@ -764,10 +764,10 @@ module Sinatra
private
def route(verb, path, options={}, &block)
options.each {|option, args| send(option, *args)}
# Because of self.options.host
host_name(options[:host]) if options.key?(:host)
host_name(options.delete(:host)) if options.key?(:host)
options.each {|option, args| send(option, *args)}
pattern, keys = compile(path)
conditions, @conditions = @conditions, []