From 1f9c90b81462d0b34c2baa56993e233dfb4b6d01 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Mon, 13 Feb 2017 20:37:04 +0800 Subject: Disable Rubocop Performance/TimesMap This cop would complain: > C: Performance/TimesMap: Use Array.new with a block instead of .times.map. I don't think this makes sense. What if we really want to have sequential numbers? We could do: `0.upto(9).map` but how that's so bad than using `10.times.map`? Performance doesn't really matter here, we're certainly not running this in a loop. It's generally used for generating some testing data only. --- .rubocop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index d30846e6e0b..39b56e0f952 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -713,7 +713,7 @@ Performance/StringReplacement: # Checks for `.times.map` calls. Performance/TimesMap: - Enabled: true + Enabled: false # Rails ####################################################################### -- cgit v1.2.1