mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Cannot parse def self.use(...)
in Ruby 2.6
This commit is contained in:
parent
04f94394b3
commit
3eb1f1dd10
1 changed files with 5 additions and 8 deletions
|
@ -218,16 +218,13 @@ module ActionController
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
# Pushes the given Rack middleware and its arguments to the bottom of the
|
class << self
|
||||||
# middleware stack.
|
# Pushes the given Rack middleware and its arguments to the bottom of the
|
||||||
if RUBY_VERSION >= "2.7"
|
# middleware stack.
|
||||||
def self.use(...)
|
def use(*args, &block)
|
||||||
middleware_stack.use(...)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
def self.use(*args, &block)
|
|
||||||
middleware_stack.use(*args, &block)
|
middleware_stack.use(*args, &block)
|
||||||
end
|
end
|
||||||
|
ruby2_keywords(:use) if respond_to?(:ruby2_keywords, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Alias for +middleware_stack+.
|
# Alias for +middleware_stack+.
|
||||||
|
|
Loading…
Reference in a new issue