Permalink
Browse files

Merge pull request #334 from ender672/file_refactor

lib/rack/file.rb -- path_info should be a local variable
  • Loading branch information...
2 parents 1ac6bd4 + 644be77 commit fb362aaa493a5518229c6419047b097931bc2198 @raggi raggi committed Mar 17, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/rack/file.rb
View
@@ -37,8 +37,8 @@ def _call(env)
return fail(405, "Method Not Allowed")
end
- @path_info = Utils.unescape(env["PATH_INFO"])
- parts = @path_info.split SEPS
+ path_info = Utils.unescape(env["PATH_INFO"])
+ parts = path_info.split SEPS
parts.inject(0) do |depth, part|
case part
@@ -63,7 +63,7 @@ def _call(env)
if available
serving(env)
else
- fail(404, "File not found: #{@path_info}")
+ fail(404, "File not found: #{path_info}")
end
end

0 comments on commit fb362aa

Please sign in to comment.