@@ -100,7 +100,7 @@ def assert_file
100100
101101 def assert_in_out_err ( args , test_stdin = "" , test_stdout = [ ] , test_stderr = [ ] , message = nil ,
102102 success : nil , failed : nil , **opt )
103- pend "#{ __method__ } " unless main_ractor?
103+ pend "#{ __method__ } " unless Test :: Unit :: TestCase . main_ractor?
104104 args = Array ( args ) . dup
105105 args . insert ( ( Hash === args [ 0 ] ? 1 : 0 ) , '--disable=gems' )
106106 stdout , stderr , status = EnvUtil . invoke_ruby ( args , test_stdin , true , true , **opt )
@@ -157,7 +157,7 @@ def syntax_check(code, fname, line)
157157 end
158158
159159 def assert_no_memory_leak ( args , prepare , code , message = nil , limit : 2.0 , rss : false , **opt )
160- omit "separate process" unless main_ractor?
160+ omit "separate process" unless Test :: Unit :: TestCase . main_ractor?
161161 # TODO: consider choosing some appropriate limit for RJIT and stop skipping this once it does not randomly fail
162162 pend 'assert_no_memory_leak may consider RJIT memory usage as leak' if defined? ( RubyVM ::RJIT ) && RubyVM ::RJIT . enabled?
163163 # For previous versions which implemented MJIT
@@ -274,7 +274,7 @@ def assert_valid_syntax(code, *args, **opt)
274274 end
275275
276276 def assert_normal_exit ( testsrc , message = '' , child_env : nil , **opt )
277- pend "#{ __method__ } " unless main_ractor?
277+ pend "#{ __method__ } " unless Test :: Unit :: TestCase . main_ractor?
278278 assert_valid_syntax ( testsrc , caller_locations ( 1 , 1 ) [ 0 ] )
279279 if child_env
280280 child_env = [ child_env ]
@@ -286,7 +286,7 @@ def assert_normal_exit(testsrc, message = '', child_env: nil, **opt)
286286 end
287287
288288 def assert_ruby_status ( args , test_stdin = "" , message = nil , **opt )
289- pend "#{ __method__ } " unless main_ractor?
289+ pend "#{ __method__ } " unless Test :: Unit :: TestCase . main_ractor?
290290 out , _ , status = EnvUtil . invoke_ruby ( args , test_stdin , true , :merge_to_stdout , **opt )
291291 desc = FailDesc [ status , message , out ]
292292 assert ( !status . signaled? , desc )
@@ -310,7 +310,7 @@ def separated_runner(token, out = nil)
310310 end
311311
312312 def assert_separately ( args , file = nil , line = nil , src , ignore_stderr : nil , **opt )
313- pend "#{ __method__ } " unless main_ractor?
313+ pend "#{ __method__ } " unless Test :: Unit :: TestCase . main_ractor?
314314 unless file and line
315315 loc , = caller_locations ( 1 , 1 )
316316 file ||= loc . path
@@ -508,7 +508,7 @@ def assert_raise_with_message(exception, expected, msg = nil, &block)
508508 assert = :assert_match
509509 end
510510 ex = m = nil
511- if multiple_ractors?
511+ if Test :: Unit :: TestCase . multiple_ractors?
512512 ex = assert_raise ( exception , msg || proc { "Exception(#{ exception } ) with message matches to #{ expected . inspect } " } ) do
513513 yield
514514 end
@@ -690,7 +690,7 @@ def assert_pattern_list(pattern_list, actual, message=nil)
690690
691691 def assert_warning ( pat , msg = nil )
692692 result = nil
693- if multiple_ractors?
693+ if Test :: Unit :: TestCase . multiple_ractors?
694694 stderr = EnvUtil . verbose_warning {
695695 result = yield
696696 }
@@ -873,7 +873,7 @@ def assert_all_assertions_foreach(msg = nil, *keys, &block)
873873 # :yield: each elements of +seq+.
874874 def assert_linear_performance ( seq , rehearsal : nil , pre : -> ( n ) { n } )
875875 pend "No PERFORMANCE_CLOCK found" unless defined? ( PERFORMANCE_CLOCK )
876- pend "Timeout" unless main_ractor?
876+ pend "Timeout" unless Test :: Unit :: TestCase . main_ractor?
877877
878878 # Timeout testing generally doesn't work when RJIT compilation happens.
879879 rjit_enabled = defined? ( RubyVM ::RJIT ) && RubyVM ::RJIT . enabled?
0 commit comments