From f32fe2d8ffc3be9c9a1824d58e381103e31871b9 Mon Sep 17 00:00:00 2001 From: Phil Ross Date: Thu, 22 Jun 2023 21:08:01 +0100 Subject: [PATCH] Ignore warnings from concurrent-ruby on JRuby 9.4. --- test/test_utils.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_utils.rb b/test/test_utils.rb index e23d7d24..60e1153e 100644 --- a/test/test_utils.rb +++ b/test/test_utils.rb @@ -435,6 +435,8 @@ def assert_sub_process_returns(expected_lines, code, load_path = [], required = # https://github.com/tzinfo/tzinfo/runs/1664655982#step:8:1893 # # Ignore untaint deprecation warnings from Bundler 1 on Ruby 3.0. + # + # Ignore method redefined warnings from concurrent-ruby on JRuby 9.4. actual_lines = actual_lines.reject do |l| l.start_with?('Gem::Specification#rubyforge_project= called from') || l.start_with?('NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement.') || @@ -446,7 +448,8 @@ def assert_sub_process_returns(expected_lines, code, load_path = [], required = l.start_with?('WARNING: All illegal access operations will be denied in a future release') || l.start_with?('WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations') || l.start_with?('io/console on JRuby shells out to stty for most operations') || - l =~ /\/bundler-1\..*\/lib\/bundler\/.*\.rb:\d+: warning: (Object|Pathname)#untaint is deprecated and will be removed in Ruby 3\.2\.\z/ + l =~ /\/bundler-1\..*\/lib\/bundler\/.*\.rb:\d+: warning: (Object|Pathname)#untaint is deprecated and will be removed in Ruby 3\.2\.\z/ || + l =~ /\/lib\/concurrent-ruby\/concurrent\/executor\/java_thread_pool_executor\.rb:\d+: warning: method redefined; discarding old to_(f|int)\z/ end if RUBY_ENGINE == 'jruby' && ENV['_JAVA_OPTIONS'] && actual_lines.first == "Picked up _JAVA_OPTIONS: #{ENV['_JAVA_OPTIONS']}"