From a779ea9d57b00bd3b59f5546603271c2d302247c Mon Sep 17 00:00:00 2001 From: Agis Anastasopoulos Date: Mon, 8 Apr 2013 22:13:13 +0300 Subject: Mark unused variables and make some style fixes It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused. --- actionpack/lib/action_dispatch/testing/assertions/selector.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/testing/assertions/selector.rb') diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index e481f3b245..3253a3d424 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -377,8 +377,8 @@ module ActionDispatch node.content.gsub(/)?/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 |elem| + text = elem.children.select{ |c| not c.tag? }.map{ |c| fix_content[c] }.join root = HTML::Document.new(CGI.unescapeHTML("#{text}")).root css_select(root, "encoded:root", &block)[0] end -- cgit v1.2.3