From e85801445f278a81d1e3a2901c4093e8f9d3e38a Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Mon, 15 May 2023 21:51:40 +0200 Subject: Fix Performance/StringIdentifierArgument offense --- .rubocop_todo.yml | 5 ----- lib/axlsx/drawing/pic.rb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2385ecb2..57bf7265 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -135,11 +135,6 @@ Performance/RegexpMatch: - 'lib/axlsx/workbook/workbook.rb' - 'lib/axlsx/workbook/worksheet/cell.rb' -# This cop supports safe autocorrection (--autocorrect). -Performance/StringIdentifierArgument: - Exclude: - - 'lib/axlsx/drawing/pic.rb' - # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle. # SupportedStyles: separated, grouped diff --git a/lib/axlsx/drawing/pic.rb b/lib/axlsx/drawing/pic.rb index 77a051c3..fa08bd83 100644 --- a/lib/axlsx/drawing/pic.rb +++ b/lib/axlsx/drawing/pic.rb @@ -239,7 +239,7 @@ module Axlsx def swap_anchor(new_anchor) new_anchor.drawing.anchors.delete(new_anchor) @anchor.drawing.anchors[@anchor.drawing.anchors.index(@anchor)] = new_anchor - new_anchor.instance_variable_set "@object", @anchor.object + new_anchor.instance_variable_set :@object, @anchor.object @anchor = new_anchor end end -- cgit v1.2.3