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:
parent
c4843a0803
commit
d7233ca8be
1 changed files with 3 additions and 3 deletions
|
@ -764,10 +764,10 @@ module Sinatra
|
||||||
|
|
||||||
private
|
private
|
||||||
def route(verb, path, options={}, &block)
|
def route(verb, path, options={}, &block)
|
||||||
options.each {|option, args| send(option, *args)}
|
|
||||||
|
|
||||||
# Because of self.options.host
|
# 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)
|
pattern, keys = compile(path)
|
||||||
conditions, @conditions = @conditions, []
|
conditions, @conditions = @conditions, []
|
||||||
|
|
Loading…
Add table
Reference in a new issue