Skip to content

Commit

Permalink
Fix some unused variable verbose warnings (#2084)
Browse files Browse the repository at this point in the history
  • Loading branch information
skipkayhil committed Jun 14, 2023
1 parent 2429b7b commit 32736d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rack/sendfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def initialize(app, variation = nil, mappings = [])
end

def call(env)
status, headers, body = response = @app.call(env)
_, headers, body = response = @app.call(env)

if body.respond_to?(:to_path)
case type = variation(env)
Expand Down
2 changes: 1 addition & 1 deletion test/spec_lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def body.each; end
def body.to_path; __FILE__ end
app = lambda { |env| [200, {}, body] }

status, headers, body = Rack::Lint.new(app).call(env({}))
body = Rack::Lint.new(app).call(env({}))[2]
body.must_respond_to(:to_path)
body.to_path.must_equal __FILE__
end
Expand Down

0 comments on commit 32736d2

Please sign in to comment.