From 8e3077c845c492a76173fab291f85cc71eaf13e0 Mon Sep 17 00:00:00 2001 From: Gonzalo Rodriguez Date: Fri, 1 Mar 2019 21:10:40 -0300 Subject: [PATCH] style: enabled Style/RedundantBegin rubocop --- .rubocop.yml | 3 +++ spec/spec_helper.rb | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 96dcfe5..cca3e40 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -50,5 +50,8 @@ Style/FrozenStringLiteralComment: Style/HashSyntax: Enabled: true +Style/RedundantBegin: + Enabled: true + Style/RedundantFreeze: Enabled: true diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ad377bf..553cb88 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -15,11 +15,9 @@ if RUBY_ENGINE == "ruby" end def safe_require(name) - begin - require name - rescue LoadError - nil - end + require name +rescue LoadError + nil end safe_require "connection_pool"