Skip to content

Commit 4af61b0

Browse files
committed
Fix test failures with Ruby 3.3.5.
Ruby 3.3.5 is causing concurrent-ruby to trigger a warning: ruby-concurrency/concurrent-ruby#1061 Ignore the warning in the output from the sub-process tests.
1 parent e391d31 commit 4af61b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/test_utils.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ def assert_sub_process_returns(expected_lines, code, load_path = [], required =
437437
# Ignore untaint deprecation warnings from Bundler 1 on Ruby 3.0.
438438
#
439439
# Ignore method redefined warnings from concurrent-ruby on JRuby 9.4.
440+
#
441+
# Ignore warnings about default gem removals.
440442
actual_lines = actual_lines.reject do |l|
441443
l.start_with?('Gem::Specification#rubyforge_project= called from') ||
442444
l.start_with?('NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement.') ||
@@ -449,7 +451,9 @@ def assert_sub_process_returns(expected_lines, code, load_path = [], required =
449451
l.start_with?('WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations') ||
450452
l.start_with?('io/console on JRuby shells out to stty for most operations') ||
451453
l =~ /\/bundler-1\..*\/lib\/bundler\/.*\.rb:\d+: warning: (Object|Pathname)#untaint is deprecated and will be removed in Ruby 3\.2\.\z/ ||
452-
l =~ /\/lib\/concurrent-ruby\/concurrent\/executor\/java_thread_pool_executor\.rb:\d+: warning: method redefined; discarding old to_(f|int)\z/
454+
l =~ /\/lib\/concurrent-ruby\/concurrent\/executor\/java_thread_pool_executor\.rb:\d+: warning: method redefined; discarding old to_(f|int)\z/ ||
455+
l =~ /warning: .* was loaded from the standard library, but will no longer be part of the default gems starting from Ruby (\d+\.){3}\z/ ||
456+
l =~ /\AYou can add .* to your Gemfile or gemspec to silence this warning\.\z/
453457
end
454458

455459
if RUBY_ENGINE == 'jruby' && ENV['_JAVA_OPTIONS'] && actual_lines.first == "Picked up _JAVA_OPTIONS: #{ENV['_JAVA_OPTIONS']}"

0 commit comments

Comments
 (0)