From 1ef7abad9022e9aa591e039a0fc9c7545b5c022d Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 1 Jul 2023 19:47:20 +0200 Subject: Fix Style/PreferredHashMethods offense `Gem.loaded_specs` is a hash, so it is safe to use `key?` and enable this cop --- lib/axlsx.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/axlsx.rb b/lib/axlsx.rb index aeef2dfc..814900fd 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -33,7 +33,7 @@ require 'bigdecimal' require 'set' require 'time' -if Gem.loaded_specs.has_key?("axlsx_styler") +if Gem.loaded_specs.key?("axlsx_styler") raise StandardError, "Please remove `axlsx_styler` from your Gemfile, the associated functionality is now built-in to `caxlsx` directly." end -- cgit v1.2.3