From d52600dfb373323641c95c3c9be952c32fee8a1a Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Wed, 5 Jul 2023 11:09:35 +0200 Subject: Fix offenses in sheet protection - Lint/AmbiguousOperatorPrecedence - Style/PerlBackrefs - Style/StringChars - Style/UnpackFirst --- test/workbook/worksheet/tc_sheet_protection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/workbook/worksheet/tc_sheet_protection.rb') diff --git a/test/workbook/worksheet/tc_sheet_protection.rb b/test/workbook/worksheet/tc_sheet_protection.rb index ebfff4b6..11a43ac8 100644 --- a/test/workbook/worksheet/tc_sheet_protection.rb +++ b/test/workbook/worksheet/tc_sheet_protection.rb @@ -57,7 +57,7 @@ class TestSheetProtection < Test::Unit::TestCase doc = Nokogiri::XML(@sp.to_xml_string) @options.each do |key, value| - assert(doc.xpath("//sheetProtection[@#{key.to_s.gsub(/_(.)/) { $1.upcase }}='#{value}']")) + assert(doc.xpath("//sheetProtection[@#{key.to_s.gsub(/_(.)/) { ::Regexp.last_match(1).upcase }}='#{value}']")) end end end -- cgit v1.2.3