Skip to content

Commit 2bf2c1a

Browse files
authored
Treat Middleware::Base#initialize options as Hash. (#2064)
1 parent 7461961 commit 2bf2c1a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#### Fixes
1010

1111
* Your contribution here.
12+
* [#2064](https://github.com/ruby-grape/grape/pull/2064): Fix Ruby 2.7 deprecation warning in `Grape::Middleware::Base#initialize` - [@skarger](https://github.com/skarger).
1213

1314
### 1.3.3 (2020/05/23)
1415

lib/grape/middleware/base.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class Base
1414

1515
# @param [Rack Application] app The standard argument for a Rack middleware.
1616
# @param [Hash] options A hash of options, simply stored for use by subclasses.
17-
def initialize(app, **options)
17+
def initialize(app, options = {})
1818
@app = app
19-
@options = default_options.merge(**options)
19+
@options = default_options.merge(options)
2020
@app_response = nil
2121
end
2222

0 commit comments

Comments
 (0)