diff options
| -rw-r--r-- | .rubocop_todo.yml | 15 | ||||
| -rw-r--r-- | lib/axlsx/stylesheet/color.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_protection.rb | 2 |
3 files changed, 2 insertions, 17 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index a80ac256..19c4b3f5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -102,21 +102,6 @@ Performance/RedundantBlockCall: - 'lib/axlsx/util/zip_command.rb' # This cop supports safe autocorrection (--autocorrect). -Performance/RedundantMatch: - Exclude: - - 'lib/axlsx/stylesheet/color.rb' - -# This cop supports safe autocorrection (--autocorrect). -Performance/RedundantSplitRegexpArgument: - Exclude: - - 'lib/axlsx/workbook/worksheet/sheet_protection.rb' - -# This cop supports safe autocorrection (--autocorrect). -Performance/RegexpMatch: - Exclude: - - 'lib/axlsx/stylesheet/color.rb' - -# This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: separated, grouped Style/AccessorGrouping: diff --git a/lib/axlsx/stylesheet/color.rb b/lib/axlsx/stylesheet/color.rb index 47617da5..87308bb1 100644 --- a/lib/axlsx/stylesheet/color.rb +++ b/lib/axlsx/stylesheet/color.rb @@ -55,7 +55,7 @@ module Axlsx v = v.upcase v = v * 3 if v.size == 2 v = v.rjust(8, 'FF') - raise ArgumentError, "Invalid color rgb value: #{v}." unless v.match(/[0-9A-F]{8}/) + raise ArgumentError, "Invalid color rgb value: #{v}." unless /[0-9A-F]{8}/.match?(v) @rgb = v end diff --git a/lib/axlsx/workbook/worksheet/sheet_protection.rb b/lib/axlsx/workbook/worksheet/sheet_protection.rb index faf34f97..e506f8d9 100644 --- a/lib/axlsx/workbook/worksheet/sheet_protection.rb +++ b/lib/axlsx/workbook/worksheet/sheet_protection.rb @@ -98,7 +98,7 @@ module Axlsx # @return [String] def encode_password(password) i = 0 - chars = password.split(//) + chars = password.split("") count = chars.size chars.collect! do |char| |
