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

Fix additional Ruby 2.7 keyword warnings #1586

Merged
merged 2 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
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
Fix additional Ruby 2.7 keyword warnings.
  • Loading branch information
stefansundin committed Jan 2, 2020
commit ac93da36a0c62b01058566095d858b5755c72eb8
4 changes: 2 additions & 2 deletions sinatra-contrib/lib/sinatra/reloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def run!(*args)
#
# Note: We are using #compile! so we don't interfere with extensions
# changing #route.
def compile!(verb, path, block, options = {})
def compile!(verb, path, block, **options)
source_location = block.respond_to?(:source_location) ?
block.source_location.first : caller_files[1]
signature = super
Expand Down Expand Up @@ -302,7 +302,7 @@ def use(middleware, *args, &block)
# Does everything Sinatra::Base#add_filter does, but it also tells
# the +Watcher::List+ for the Sinatra application to watch the defined
# filter.
def add_filter(type, path = nil, options = {}, &block)
def add_filter(type, path = nil, **options, &block)
source_location = block.respond_to?(:source_location) ?
block.source_location.first : caller_files[1]
result = super
Expand Down
2 changes: 1 addition & 1 deletion sinatra-contrib/lib/sinatra/respond_with.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def rendering_method(engine)

private

def compile!(verb, path, block, options = {})
def compile!(verb, path, block, **options)
options[:provides] ||= respond_to if respond_to
super
end
Expand Down