Add performance rubocop and fixes

This commit is contained in:
Mike Angell
2019-08-27 22:07:44 +10:00
parent ef8a6dcda1
commit 2d0917493d
12 changed files with 20 additions and 18 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ class ProductDrop < Liquid::Drop
class CatchallDrop < Liquid::Drop
def liquid_method_missing(method)
'catchall_method: '.dup << method.to_s
+'catchall_method: ' << method.to_s
end
end
@@ -50,7 +50,7 @@ class ProductDrop < Liquid::Drop
end
def user_input
'foo'.dup.taint
(+'foo').taint
end
protected
+2 -2
View File
@@ -63,7 +63,7 @@ class BlockUnitTest < Minitest::Test
assert_equal 'hello', template.render
buf = ''.dup
buf = +''
output = template.render({}, output: buf)
assert_equal 'hello', output
assert_equal 'hello', buf
@@ -81,7 +81,7 @@ class BlockUnitTest < Minitest::Test
assert_equal 'foohellobar', template.render
buf = ''.dup
buf = +''
output = template.render({}, output: buf)
assert_equal 'foohellobar', output
assert_equal 'foohellobar', buf
+2 -2
View File
@@ -33,7 +33,7 @@ class TagUnitTest < Minitest::Test
assert_equal 'hello', template.render
buf = ''.dup
buf = +''
output = template.render({}, output: buf)
assert_equal 'hello', output
assert_equal 'hello', buf
@@ -51,7 +51,7 @@ class TagUnitTest < Minitest::Test
assert_equal 'foohellobar', template.render
buf = ''.dup
buf = +''
output = template.render({}, output: buf)
assert_equal 'foohellobar', output
assert_equal 'foohellobar', buf