1
0
Fork 0
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:
Ryuta Kamizono 2019-12-26 18:30:11 +09:00
parent 04f94394b3
commit 3eb1f1dd10

View file

@ -218,16 +218,13 @@ module ActionController
super super
end end
class << self
# Pushes the given Rack middleware and its arguments to the bottom of the # Pushes the given Rack middleware and its arguments to the bottom of the
# middleware stack. # middleware stack.
if RUBY_VERSION >= "2.7" def use(*args, &block)
def self.use(...)
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+.