aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/assertions/selector.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-22 16:47:22 -0300
committerEmilio Tagua <miloops@gmail.com>2010-09-27 11:19:22 -0300
commit583ddf22a2a9d9f903ff0f2dba72cc04e80a378f (patch)
tree4b20582ac4b4aecc44487d88bc69690d2ac2aa9b /actionpack/lib/action_dispatch/testing/assertions/selector.rb
parentdafb4bd33ba26bf8ca3455db270fee843c8bd2fd (diff)
downloadrails-583ddf22a2a9d9f903ff0f2dba72cc04e80a378f.tar.gz
rails-583ddf22a2a9d9f903ff0f2dba72cc04e80a378f.tar.bz2
rails-583ddf22a2a9d9f903ff0f2dba72cc04e80a378f.zip
Remove more warnings shadowing outer local variable.
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions/selector.rb')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/selector.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
index e1015c62cd..86fba87586 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 |element|
- text = element.children.select{ |c| not c.tag? }.map{ |c| fix_content[c] }.join
+ selected = elements.map do |ele|
+ text = ele.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