@@ -394,6 +394,7 @@ def test_raise_with_wrong_number_of_arguments
394394 end
395395
396396 def test_type_error_message_encoding
397+ omit "global side effects" if multiple_ractors?
397398 c = eval ( "Module.new do break class C\u{4032} ; self; end; end" )
398399 o = c . new
399400 assert_raise_with_message ( TypeError , /C\u{4032} / ) do
@@ -446,6 +447,7 @@ def test_errat
446447 end
447448
448449 def test_thread_signal_location
450+ omit "subprocess" unless main_ractor?
449451 # pend('TODO: a known bug [Bug #14474]')
450452 _ , stderr , _ = EnvUtil . invoke_ruby ( %w" --disable-gems -d " , <<-RUBY , false , true )
451453Thread.start do
@@ -561,6 +563,7 @@ def test_errno_constants
561563 end
562564
563565 def test_too_many_args_in_eval
566+ omit "TODO: freezes process" if multiple_ractors?
564567 bug5720 = '[ruby-core:41520]'
565568 arg_string = ( 0 ...140000 ) . to_a . join ( ", " )
566569 assert_raise ( SystemStackError , bug5720 ) { eval "raise(#{ arg_string } )" }
@@ -1065,6 +1068,7 @@ def test_message_of_name_error
10651068 end
10661069
10671070 def capture_warning_warn ( category : false )
1071+ omit "global side effects" if multiple_ractors?
10681072 verbose = $VERBOSE
10691073 categories = Warning . categories . to_h { |cat | [ cat , Warning [ cat ] ] }
10701074 warning = [ ]
@@ -1090,13 +1094,15 @@ def capture_warning_warn(category: false)
10901094
10911095 return warning
10921096 ensure
1093- $VERBOSE = verbose
1094- categories . each { |cat , flag | Warning [ cat ] = flag }
1095-
1096- ::Warning . class_eval do
1097- remove_method :warn
1098- alias_method :warn , :warn2
1099- remove_method :warn2
1097+ if verbose
1098+ $VERBOSE = verbose
1099+ categories . each { |cat , flag | Warning [ cat ] = flag }
1100+
1101+ ::Warning . class_eval do
1102+ remove_method :warn
1103+ alias_method :warn , :warn2
1104+ remove_method :warn2
1105+ end
11001106 end
11011107 end
11021108
@@ -1189,6 +1195,7 @@ def warn(message)
11891195 end
11901196
11911197 def test_warning_category
1198+ omit "global side effects" if multiple_ractors?
11921199 assert_raise ( TypeError ) { Warning [ nil ] }
11931200 assert_raise ( ArgumentError ) { Warning [ :XXXX ] }
11941201
@@ -1309,12 +1316,14 @@ def test_full_message
13091316
13101317 test_method = "def foo; raise 'testerror'; end"
13111318
1312- out1 , err1 , status1 = EnvUtil . invoke_ruby ( [ '-e' , "#{ test_method } ; begin; foo; rescue => e; puts e.full_message; end" ] , '' , true , true )
1313- assert_predicate ( status1 , :success? )
1314- assert_empty ( err1 , "expected nothing wrote to $stdout by #full_message" )
1319+ if main_ractor?
1320+ out1 , err1 , status1 = EnvUtil . invoke_ruby ( [ '-e' , "#{ test_method } ; begin; foo; rescue => e; puts e.full_message; end" ] , '' , true , true )
1321+ assert_predicate ( status1 , :success? )
1322+ assert_empty ( err1 , "expected nothing wrote to $stdout by #full_message" )
13151323
1316- _ , err2 , status1 = EnvUtil . invoke_ruby ( [ '-e' , "#{ test_method } ; begin; foo; end" ] , '' , true , true )
1317- assert_equal ( err2 , out1 )
1324+ _ , err2 , status1 = EnvUtil . invoke_ruby ( [ '-e' , "#{ test_method } ; begin; foo; end" ] , '' , true , true )
1325+ assert_equal ( err2 , out1 )
1326+ end
13181327
13191328 e = RuntimeError . new ( "a\n " )
13201329 message = assert_nothing_raised ( ArgumentError , proc { e . pretty_inspect } ) do
@@ -1447,6 +1456,7 @@ def test_detailed_message
14471456
14481457 def test_detailed_message_under_gc_compact_stress
14491458 omit "compaction doesn't work well on s390x" if RUBY_PLATFORM =~ /s390x/ # https://github.com/ruby/ruby/pull/5077
1459+ omit "gc_compact_stress" if multiple_ractors?
14501460 EnvUtil . under_gc_compact_stress do
14511461 e = RuntimeError . new ( "foo\n bar\n baz" )
14521462 assert_equal ( "foo (RuntimeError)\n bar\n baz" , e . detailed_message )
0 commit comments