From d8e16cf1a86357ca77529419bbf0489a13359e67 Mon Sep 17 00:00:00 2001 From: david942j Date: Sat, 11 Jan 2025 08:36:12 +0000 Subject: [PATCH 1/2] Fix warnings on Ruby 3.4 --- Gemfile.lock | 2 ++ lib/seccomp-tools/instruction/ret.rb | 2 +- seccomp-tools.gemspec | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6e53624..671e3c4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,6 +15,7 @@ GEM language_server-protocol (3.17.0.3) logger (1.6.5) os (1.1.4) + ostruct (0.6.1) parallel (1.26.3) parser (3.3.6.0) ast (~> 2.4.1) @@ -67,6 +68,7 @@ PLATFORMS x86_64-linux DEPENDENCIES + ostruct rake (~> 13.0) rake-compiler (~> 1.0) rspec (~> 3.9) diff --git a/lib/seccomp-tools/instruction/ret.rb b/lib/seccomp-tools/instruction/ret.rb index 8180df9..a63ba08 100644 --- a/lib/seccomp-tools/instruction/ret.rb +++ b/lib/seccomp-tools/instruction/ret.rb @@ -31,7 +31,7 @@ def ret_str return 'A' if type == :a str = ACTION.invert[type & SECCOMP_RET_ACTION_FULL].to_s - str << "(#{type & SECCOMP_RET_DATA})" if str == 'ERRNO' + str += "(#{type & SECCOMP_RET_DATA})" if str == 'ERRNO' str end end diff --git a/seccomp-tools.gemspec b/seccomp-tools.gemspec index 6c50fb1..ce3edcd 100644 --- a/seccomp-tools.gemspec +++ b/seccomp-tools.gemspec @@ -30,6 +30,7 @@ Visit https://github.com/david942j/seccomp-tools for more details. s.required_ruby_version = '>= 3.1' + s.add_development_dependency 'ostruct' s.add_development_dependency 'rake', '~> 13.0' s.add_development_dependency 'rake-compiler', '~> 1.0' s.add_development_dependency 'rspec', '~> 3.9' From 76499d1023af9680ee598962c7f0a3350212e25f Mon Sep 17 00:00:00 2001 From: david942j Date: Sat, 11 Jan 2025 08:37:53 +0000 Subject: [PATCH 2/2] Add Ruby 3.4 and head to CI --- .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 fad2011..464e464 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ubuntu] - ruby-version: ['3.1', '3.2', '3.3'] + ruby-version: ['3.1', '3.2', '3.3', '3.4', 'head'] steps: - uses: actions/checkout@v2