From 931680a1e12bbca14fb9cde810c849164d4bb0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 21 Jul 2025 17:43:08 +0200 Subject: [PATCH 1/2] Recognize quote as well as backtick in error message Ruby 3.4 started use singlequote instead of opening backtick in the error messages [[1]]. This exhibited in error: ~~~ 2) ABRT handles exception in 'abrt.rb' with RubyGems enabled Failure/Error: expect { system "ruby --disable-gems -rrubygems #{abrt_rb}" } .to output(/\A\Z/).to_stdout_from_any_process .and output(output_message_pattern).to_stderr_from_any_process expected block to output /\A\/mnt\/abrt\/spec\/..\/lib\/abrt.rb:\d+:in `
': can't modify frozen Array(: \[1, 2, 3\])? \((FrozenError|RuntimeError)\)\n\Z/ to stderr, but output "/mnt/abrt/spec/../lib/abrt.rb:15:in '
': can't modify frozen Array: [1, 2, 3] (FrozenError)\n" Diff for (output /\A\/mnt\/abrt\/spec\/..\/lib\/abrt.rb:\d+:in `
':...): @@ -1 +1 @@ -/\A\/mnt\/abrt\/spec\/..\/lib\/abrt.rb:\d+:in `
': can't modify frozen Array(: \[1, 2, 3\])? \((FrozenError|RuntimeError)\)\n\Z/ +/mnt/abrt/spec/../lib/abrt.rb:15:in '
': can't modify frozen Array: [1, 2, 3] (FrozenError) # ./spec/abrt_spec.rb:16:in 'block (3 levels) in ' ~~~ [1]: https://bugs.ruby-lang.org/issues/16495 --- spec/abrt_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/abrt_spec.rb b/spec/abrt_spec.rb index cd8ef41..3133261 100644 --- a/spec/abrt_spec.rb +++ b/spec/abrt_spec.rb @@ -3,7 +3,7 @@ describe 'ABRT' do context "handles exception in 'abrt.rb' with RubyGems" do abrt_rb = File.join(File.dirname(__FILE__), '../lib/abrt.rb') - output_message_pattern = /\A#{abrt_rb}:\d+:in `
': can't modify frozen Array(: \[1, 2, 3\])? \((FrozenError|RuntimeError)\)\n\Z/ + output_message_pattern = /\A#{abrt_rb}:\d+:in [`']
': can't modify frozen Array(: \[1, 2, 3\])? \((FrozenError|RuntimeError)\)\n\Z/ it 'disabled' do expect { system "ruby --disable-gems #{abrt_rb}" } From e1a88e467706a72a5baaa28b18800515b6b868e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 1 Aug 2025 14:00:46 +0200 Subject: [PATCH 2/2] Add Ruby 3.4 and head into test matrix --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7b1828b..b944abb 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - ruby-version: ['2.5', '3.0', '3.1', '3.2', '3.3'] + ruby-version: ['2.5', '3.0', '3.1', '3.2', '3.3', '3.4', 'head'] steps: - uses: actions/checkout@v4