Permalink
Browse files

Add parenthesis to avoid syntax warnings.

  • Loading branch information...
1 parent 059d609 commit 9027721b11436144e65bceb9e29ad8669b02582a @miloops miloops committed Sep 28, 2010
View
2 actionpack/test/template/prototype_helper_test.rb
@@ -71,7 +71,7 @@ def protect_against_forgery?
end
def create_generator
- block = Proc.new { |*args| yield *args if block_given? }
+ block = Proc.new { |*args| yield(*args) if block_given? }
JavaScriptGenerator.new self, &block
end
end
View
2 actionpack/test/template/tag_helper_test.rb
@@ -103,7 +103,7 @@ def test_tag_honors_html_safe_for_param_values
def test_skip_invalid_escaped_attributes
['&1;', '&#1dfa3;', '& #123;'].each do |escaped|
- assert_equal %(<a href="#{escaped.gsub /&/, '&amp;'}" />), tag('a', :href => escaped)
+ assert_equal %(<a href="#{escaped.gsub(/&/, '&amp;')}" />), tag('a', :href => escaped)
end
end

0 comments on commit 9027721

Please sign in to comment.