diff --git a/.github/workflows/rubocop.yml b/.github/workflows/rubocop.yml index aec71de..a546aad 100644 --- a/.github/workflows/rubocop.yml +++ b/.github/workflows/rubocop.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 - name: Set up Ruby - uses: ruby/setup-ruby@v1.321.0 + uses: ruby/setup-ruby@v1.324.0 with: ruby-version: '4.0' rubygems: latest diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index a34f8c4..82e9494 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -39,7 +39,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 - name: Set up Ruby - uses: ruby/setup-ruby@v1.321.0 + uses: ruby/setup-ruby@v1.324.0 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true diff --git a/lib/sharepoint/client.rb b/lib/sharepoint/client.rb index c78b63f..e026aee 100644 --- a/lib/sharepoint/client.rb +++ b/lib/sharepoint/client.rb @@ -1200,13 +1200,12 @@ def uri_unescape(uri) end # TODO: Try to remove `eval` from this method. Otherwise, fix offenses - # rubocop:disable Security/Eval, Style/DocumentDynamicEvalDefinition, Style/EvalWithLocation, Style/PercentLiteralDelimiters + # rubocop:disable-next Security/Eval, Style/DocumentDynamicEvalDefinition, Style/EvalWithLocation, Style/PercentLiteralDelimiters def string_unescape(s) s.gsub!(/\\(?:[abfnrtv])/, '') # remove control chars s.gsub!('"', '\"') # escape double quotes eval %Q{"#{s}"} end - # rubocop:enable Security/Eval, Style/DocumentDynamicEvalDefinition, Style/EvalWithLocation, Style/PercentLiteralDelimiters def utf8_encode(s) s.force_encoding('UTF-8') unless s.nil?