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
Next Next commit
Keyword parameter causes deprecation warning. In the future, this wil…
…l occur errors.
  • Loading branch information
osamtimizer committed Dec 5, 2019
commit c906370e4fc14b9b368427026c80332c609d67b6
4 changes: 2 additions & 2 deletions lib/sinatra/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ def provides(*types)

def route(verb, path, options = {}, &block)
enable :empty_path_info if path == "" and empty_path_info.nil?
signature = compile!(verb, path, block, options)
signature = compile!(verb, path, block, **options)
(@routes[verb] ||= []) << signature
invoke_hook(:route_added, verb, path, block)
signature
Expand Down Expand Up @@ -1638,7 +1638,7 @@ def compile!(verb, path, block, **options)
end

def compile(path, route_mustermann_opts = {})
Mustermann.new(path, mustermann_opts.merge(route_mustermann_opts))
Mustermann.new(path, **mustermann_opts.merge(route_mustermann_opts))
end

def setup_default_middleware(builder)
Expand Down