提交 9027721b 编写于 作者: E Emilio Tagua

Add parenthesis to avoid syntax warnings.

上级 059d609a
......@@ -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
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册