Skip to content

Commit

Permalink
Treat Middleware::Base#initialize options as Hash. (#2064)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarger authored May 29, 2020
1 parent 7461961 commit 2bf2c1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#### Fixes

* Your contribution here.
* [#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).

### 1.3.3 (2020/05/23)

Expand Down
4 changes: 2 additions & 2 deletions lib/grape/middleware/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class Base

# @param [Rack Application] app The standard argument for a Rack middleware.
# @param [Hash] options A hash of options, simply stored for use by subclasses.
def initialize(app, **options)
def initialize(app, options = {})
@app = app
@options = default_options.merge(**options)
@options = default_options.merge(options)
@app_response = nil
end

Expand Down

0 comments on commit 2bf2c1a

Please sign in to comment.