Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eliminate warnings of keyword parameter for ruby 2.7.0 #1581

Merged
merged 2 commits into from
Dec 13, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix deprecations on non-tested code
  • Loading branch information
osamtimizer committed Dec 7, 2019
commit 0bb4d0bfbc93122e681152978a0c86345baa6aba
6 changes: 3 additions & 3 deletions lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1345,19 +1345,19 @@ def mime_types(type)
# context as route handlers and may access/modify the request and
# response.
def before(path = /.*/, **options, &block)
add_filter(:before, path, options, &block)
add_filter(:before, path, **options, &block)
end

# Define an after filter; runs after all requests within the same
# context as route handlers and may access/modify the request and
# response.
def after(path = /.*/, **options, &block)
add_filter(:after, path, options, &block)
add_filter(:after, path, **options, &block)
end

# add a filter
def add_filter(type, path = /.*/, **options, &block)
filters[type] << compile!(type, path, block, options)
filters[type] << compile!(type, path, block, **options)
end

# Add a route condition. The route is considered non-matching when the
Expand Down