Skip to content
Browse files

Don't shadow outer local variables.

  • Loading branch information...
1 parent 6b135f7 commit dafb4bd33ba26bf8ca3455db270fee843c8bd2fd @miloops miloops committed Sep 22, 2010
View
2 actionpack/lib/action_dispatch/testing/test_request.rb
@@ -66,7 +66,7 @@ def user_agent=(user_agent)
def accept=(mime_types)
@env.delete('action_dispatch.request.accepts')
- @env['HTTP_ACCEPT'] = Array(mime_types).collect { |mime_types| mime_types.to_s }.join(",")
+ @env['HTTP_ACCEPT'] = Array(mime_types).collect { |mime_type| mime_type.to_s }.join(",")
end
def cookies
View
8 actionpack/lib/action_view/testing/resolvers.rb
@@ -22,10 +22,10 @@ def query(path, exts, formats)
end
templates = []
- @hash.select { |k,v| k =~ /^#{query}$/ }.each do |path, source|
- handler, format = extract_handler_and_format(path, formats)
- templates << Template.new(source, path, handler,
- :virtual_path => path, :format => format)
+ @hash.select { |k,v| k =~ /^#{query}$/ }.each do |_path, source|
+ handler, format = extract_handler_and_format(_path, formats)
+ templates << Template.new(source, _path, handler,
+ :virtual_path => _path, :format => format)
end
templates.sort_by {|t| -t.identifier.match(/^#{query}$/).captures.reject(&:blank?).size }

0 comments on commit dafb4bd

Please sign in to comment.
Something went wrong with that request. Please try again.