Skip to content

Commit

Permalink
Squash warnings for unused variables and the like
Browse files Browse the repository at this point in the history
  • Loading branch information
raggi committed Dec 21, 2011
1 parent 48a31aa commit 12ad093
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rack/file.rb
Expand Up @@ -40,7 +40,7 @@ def _call(env)
@path_info = Utils.unescape(env["PATH_INFO"])
parts = @path_info.split SEPS

total_depth = parts.inject(0) do |depth, part|
parts.inject(0) do |depth, part|
case part
when '', '.'
depth
Expand Down
1 change: 1 addition & 0 deletions test/spec_builder.rb
Expand Up @@ -181,6 +181,7 @@ def config_file(name)

it "removes __END__ before evaluating app" do
app, options = Rack::Builder.parse_file config_file('end.ru')
options = nil # ignored, prevents warning
Rack::MockRequest.new(app).get("/").body.to_s.should.equal 'OK'
end

Expand Down
2 changes: 1 addition & 1 deletion test/spec_content_length.rb
Expand Up @@ -52,7 +52,7 @@ def to_ary; end
end.new(%w[one two three])

app = lambda { |env| [200, {}, body] }
response = Rack::ContentLength.new(app).call({})
Rack::ContentLength.new(app).call({})
body.closed.should.equal true
end

Expand Down
2 changes: 0 additions & 2 deletions test/spec_file.rb
Expand Up @@ -148,8 +148,6 @@
env = Rack::MockRequest.env_for("/cgi/test")
status, heads, _ = Rack::File.new(DOCROOT, 'public, max-age=38').call(env)

path = File.join(DOCROOT, "/cgi/test")

status.should.equal 200
heads['Cache-Control'].should.equal 'public, max-age=38'
end
Expand Down

0 comments on commit 12ad093

Please sign in to comment.