From 1d0842e0c5fd18c8b9ba8537ac37dd236aadbfbc Mon Sep 17 00:00:00 2001 From: takahashim Date: Sun, 15 Dec 2019 02:18:17 +0900 Subject: [PATCH 1/3] fix ERB arguments; use keyword args --- lib/review/template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/review/template.rb b/lib/review/template.rb index 9ed7313a0..8f931d74f 100644 --- a/lib/review/template.rb +++ b/lib/review/template.rb @@ -13,7 +13,7 @@ def self.load(filename, mode = 1) def initialize(filename = nil, mode = nil) return unless filename content = File.read(filename) - @erb = ERB.new(content, nil, mode) + @erb = ERB.new(content, trim_mode: mode) end def result(bind_data = nil) From d2a50f381458ec586c243d5396b039938101b670 Mon Sep 17 00:00:00 2001 From: takahashim Date: Sun, 15 Dec 2019 02:53:44 +0900 Subject: [PATCH 2/3] Revert "fix ERB arguments; use keyword args" This reverts commit 1d0842e0c5fd18c8b9ba8537ac37dd236aadbfbc. --- lib/review/template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/review/template.rb b/lib/review/template.rb index 8f931d74f..9ed7313a0 100644 --- a/lib/review/template.rb +++ b/lib/review/template.rb @@ -13,7 +13,7 @@ def self.load(filename, mode = 1) def initialize(filename = nil, mode = nil) return unless filename content = File.read(filename) - @erb = ERB.new(content, trim_mode: mode) + @erb = ERB.new(content, nil, mode) end def result(bind_data = nil) From 0a97ae4de0e998fb1b721b4a9d4230161c246532 Mon Sep 17 00:00:00 2001 From: takahashim Date: Sun, 15 Dec 2019 02:55:58 +0900 Subject: [PATCH 3/3] fix rubocop; List/ErbNewArguments is disabled --- .rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 4ffe54efb..c3dbc2dc6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -40,6 +40,9 @@ Lint/UnusedMethodArgument: Lint/UselessAssignment: Enabled: true +Lint/ErbNewArguments: + Enabled: false + #### Performance Performance/RegexpMatch: