diff --git a/.rubocop_todo/style/inline_disable_annotation.yml b/.rubocop_todo/style/inline_disable_annotation.yml
index c8b4dfedc41077bf037324dfbe919b92bccfa5e6..92d1328106c9ccb8f1327f6c65e2237ccb79a7ef 100644
--- a/.rubocop_todo/style/inline_disable_annotation.yml
+++ b/.rubocop_todo/style/inline_disable_annotation.yml
@@ -2780,7 +2780,6 @@ Style/InlineDisableAnnotation:
     - 'spec/controllers/projects/releases_controller_spec.rb'
     - 'spec/controllers/projects/runners_controller_spec.rb'
     - 'spec/db/docs_spec.rb'
-    - 'spec/deprecation_warnings.rb'
     - 'spec/factories/design_management/designs.rb'
     - 'spec/factories/events.rb'
     - 'spec/factories/go_module_commits.rb'
diff --git a/spec/deprecation_warnings.rb b/spec/deprecation_warnings.rb
index abdd13ee8e7a841bc072bf07280142b526e9d64c..3ebca87f3e1fad984514577acc25fff8a91ed281 100644
--- a/spec/deprecation_warnings.rb
+++ b/spec/deprecation_warnings.rb
@@ -7,13 +7,11 @@
 # to developers to ease upgrading to newer Ruby versions.
 Warning[:deprecated] = true
 
-# rubocop:disable Layout/LineLength
+# rubocop:disable Layout/LineLength -- Avoid multiline (x modifier) Regexp to keep it readable
 case RUBY_VERSION[/\d+\.\d+/, 0]
-when '3.2'
-  warn "#{__FILE__}:#{__LINE__}: warning: Ignored warnings for Ruby < 3.2 are no longer necessary."
-else
+when '3.1'
   require 'warning'
-  # Ignore Ruby warnings until Ruby 3.2.
+  # These warnings only happen in Ruby 3.1 and are gone in Ruby 3.2.
   #  ... ruby/3.1.3/lib/ruby/gems/3.1.0/gems/rspec-parameterized-table_syntax-1.0.0/lib/rspec/parameterized/table_syntax.rb:38: warning: Refinement#include is deprecated and will be removed in Ruby 3.2
 
   Warning.ignore(%r{rspec-parameterized-table_syntax-1\.0\.0/lib/rspec/parameterized/table_syntax\.rb:\d+: warning: Refinement#include is deprecated})