Skip to content

Commit

Permalink
Shadowing variable warning removed
Browse files Browse the repository at this point in the history
  • Loading branch information
arunagw committed Apr 26, 2012
1 parent 363a06f commit 68aadbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionpack/lib/action_dispatch/routing/mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1306,14 +1306,14 @@ def shallow?
end

def draw(name)
path = @draw_paths.find do |path|
path.join("#{name}.rb").file?
path = @draw_paths.find do |_path|
_path.join("#{name}.rb").file?
end

unless path
msg = "Your router tried to #draw the external file #{name}.rb,\n" \
"but the file was not found in:\n\n"
msg += @draw_paths.map { |path| " * #{path}" }.join("\n")
msg += @draw_paths.map { |_path| " * #{_path}" }.join("\n")
raise msg
end

Expand Down

0 comments on commit 68aadbc

Please sign in to comment.