Skip to content

Commit

Permalink
Mark load_dependencies in plugins as accepting a block if configure a…
Browse files Browse the repository at this point in the history
…ccepts a block

This avoids unused block warnings on Ruby 3.4.
  • Loading branch information
jeremyevans committed May 21, 2024
1 parent be6a6aa commit 7ac47cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/roda/plugins/filter_common_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module RodaPlugins
# !request.path.start_with?('/admin/')
# end
module FilterCommonLogger
def self.load_dependencies(app)
def self.load_dependencies(app, &_)
app.plugin :common_logger
end

Expand Down
2 changes: 1 addition & 1 deletion lib/roda/plugins/not_found.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module RodaPlugins
# still exists mainly for backward compatibility.
module NotFound
# Require the status_handler plugin
def self.load_dependencies(app)
def self.load_dependencies(app, &_)
app.plugin :status_handler
end

Expand Down
2 changes: 1 addition & 1 deletion lib/roda/plugins/route_csrf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ module RouteCsrf
# a valid CSRF token was not provided.
class InvalidToken < RodaError; end

def self.load_dependencies(app, opts=OPTS)
def self.load_dependencies(app, opts=OPTS, &_)
app.plugin :_base64
end

Expand Down

0 comments on commit 7ac47cd

Please sign in to comment.