style: enabled Style/RedundantBegin rubocop

This commit is contained in:
Gonzalo Rodriguez 2019-03-01 21:10:40 -03:00
parent 7dbb490c01
commit 8e3077c845
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1
2 changed files with 6 additions and 5 deletions

View file

@ -50,5 +50,8 @@ Style/FrozenStringLiteralComment:
Style/HashSyntax:
Enabled: true
Style/RedundantBegin:
Enabled: true
Style/RedundantFreeze:
Enabled: true

View file

@ -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"