aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-27 15:18:35 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-09-27 16:43:17 -0300
commit1ab2ab07b5e7c4031c014175887e9f20b8f60a4c (patch)
treec2cc5c3dac7623044599b25b4b3239a5b6ad6142 /actionpack/lib
parent2f326b7f27349b933fe617d83b3f80c6573ce5d8 (diff)
downloadrails-1ab2ab07b5e7c4031c014175887e9f20b8f60a4c.tar.gz
rails-1ab2ab07b5e7c4031c014175887e9f20b8f60a4c.tar.bz2
rails-1ab2ab07b5e7c4031c014175887e9f20b8f60a4c.zip
Remove more warnings shadowing outer local variable.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/helpers.rb6
-rw-r--r--actionpack/lib/action_controller/vendor/html-scanner/html/node.rb6
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/selector.rb4
3 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb
index f10fc66b52..d14831b763 100644
--- a/actionpack/lib/action_controller/metal/helpers.rb
+++ b/actionpack/lib/action_controller/metal/helpers.rb
@@ -96,9 +96,9 @@ module ActionController
def all_helpers_from_path(path)
helpers = []
- Array.wrap(path).each do |p|
- extract = /^#{Regexp.quote(p.to_s)}\/?(.*)_helper.rb$/
- helpers += Dir["#{p}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') }
+ Array.wrap(path).each do |_path|
+ extract = /^#{Regexp.quote(_path.to_s)}\/?(.*)_helper.rb$/
+ helpers += Dir["#{_path}/**/*_helper.rb"].map { |file| file.sub(extract, '\1') }
end
helpers.sort!
helpers.uniq!
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
index c82324dee6..22b3243104 100644
--- a/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
+++ b/actionpack/lib/action_controller/vendor/html-scanner/html/node.rb
@@ -18,14 +18,14 @@ module HTML #:nodoc:
hash[k] = Conditions.new(v)
when :children
hash[k] = v = keys_to_symbols(v)
- v.each do |key,v2|
+ v.each do |key,value|
case key
when :count, :greater_than, :less_than
# keys are valid, and require no further processing
when :only
- v[key] = Conditions.new(v2)
+ v[key] = Conditions.new(value)
else
- raise "illegal key #{k.inspect} => #{v2.inspect}"
+ raise "illegal key #{key.inspect} => #{value.inspect}"
end
end
else
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
index 86fba87586..353be10d20 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -513,8 +513,8 @@ module ActionDispatch
node.content.gsub(/<!\[CDATA\[(.*)(\]\]>)?/m) { Rack::Utils.escapeHTML($1) }
end
- selected = elements.map do |ele|
- text = ele.children.select{ |c| not c.tag? }.map{ |c| fix_content[c] }.join
+ selected = elements.map do |_element|
+ text = _element.children.select{ |c| not c.tag? }.map{ |c| fix_content[c] }.join
root = HTML::Document.new(CGI.unescapeHTML("<encoded>#{text}</encoded>")).root
css_select(root, "encoded:root", &block)[0]
end