Skip to content

Commit 464a638

Browse files
authored
Merge branch 'master' into deprecated-funcs
2 parents 9379804 + c794a97 commit 464a638

21 files changed

+81
-42
lines changed

ext/-test-/stack/stack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "internal/string.h"
33

44
static VALUE
5-
stack_alloca_overflow(VALUE self)
5+
stack_overflow(VALUE self)
66
{
77
size_t i = 0;
88

@@ -30,6 +30,6 @@ asan_p(VALUE klass)
3030
void
3131
Init_stack(VALUE klass)
3232
{
33-
rb_define_singleton_method(rb_cThread, "alloca_overflow", stack_alloca_overflow, 0);
33+
rb_define_singleton_method(rb_cThread, "stack_overflow", stack_overflow, 0);
3434
rb_define_singleton_method(rb_cThread, "asan?", asan_p, 0);
3535
}

test/-ext-/stack/test_stack_overflow.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_overflow
1717
require '-test-/stack'
1818
1919
assert_raise(SystemStackError) do
20-
Thread.alloca_overflow
20+
Thread.stack_overflow
2121
end
2222
RUBY
2323
end
@@ -29,7 +29,7 @@ def test_thread_stack_overflow
2929
3030
thread = Thread.new do
3131
Thread.current.report_on_exception = false
32-
Thread.alloca_overflow
32+
Thread.stack_overflow
3333
end
3434
3535
assert_raise(SystemStackError) do
@@ -44,7 +44,7 @@ def test_fiber_stack_overflow
4444
GC.disable
4545
4646
fiber = Fiber.new do
47-
Thread.alloca_overflow
47+
Thread.stack_overflow
4848
end
4949
5050
assert_raise(SystemStackError) do

test/-ext-/tracepoint/test_tracepoint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def run(hook)
8383
end
8484

8585
def test_teardown_with_active_GC_end_hook
86-
assert_separately([], 'require("-test-/tracepoint"); Bug.after_gc_exit_hook = proc {}; GC.start')
86+
assert_ruby_status([], 'require("-test-/tracepoint"); Bug.after_gc_exit_hook = proc {}; GC.start')
8787
end
8888

8989
end

test/objspace/test_objspace.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def test_reachable_objects_from
143143
def test_reachable_objects_during_iteration
144144
omit 'flaky on Visual Studio with: [BUG] Unnormalized Fixnum value' if /mswin/ =~ RUBY_PLATFORM
145145
opts = %w[--disable-gem --disable=frozen-string-literal -robjspace]
146-
assert_separately opts, "#{<<-"begin;"}\n#{<<-'end;'}"
146+
assert_ruby_status opts, "#{<<-"begin;"}\n#{<<-'end;'}"
147147
begin;
148148
ObjectSpace.each_object{|o|
149149
o.inspect
@@ -179,7 +179,7 @@ def test_reachable_objects_size
179179
end
180180

181181
def test_trace_object_allocations_stop_first
182-
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
182+
assert_ruby_status([], "#{<<~"begin;"}\n#{<<~'end;'}")
183183
begin;
184184
require "objspace"
185185
# Make sure stopping before the tracepoints are initialized doesn't raise. See [Bug #17020]

test/openssl/test_fips.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_fips_mode_get_is_false_on_fips_mode_disabled
3030
def test_fips_mode_is_reentrant
3131
return if aws_lc? # AWS-LC's FIPS mode is decided at compile time.
3232

33-
assert_separately(["-ropenssl"], <<~"end;")
33+
assert_ruby_status(["-ropenssl"], <<~"end;")
3434
OpenSSL.fips_mode = false
3535
OpenSSL.fips_mode = false
3636
end;

test/ripper/assert_parse_files.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class Parser < Ripper
4040
end
4141
}
4242
end
43+
assert(true) if scripts.empty?
4344
end;
4445
end
4546
end

test/ruby/test_autoload.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ def test_autoload_parallel_race
574574
autoload_path = File.join(tmpdir, "autoload_parallel_race.rb")
575575
File.write(autoload_path, 'module Foo; end; module Bar; end')
576576

577-
assert_separately([], <<-RUBY, timeout: 100)
577+
assert_ruby_status([], <<-RUBY, timeout: 100)
578578
autoload_path = #{File.realpath(autoload_path).inspect}
579579
580580
# This should work with no errors or failures.
@@ -617,6 +617,10 @@ module SomeNamespace
617617
private
618618

619619
def assert_separately(*args, **kwargs)
620-
super(*args, **{ timeout: 60 }.merge(kwargs))
620+
super(*args, timeout: 60, **kwargs)
621+
end
622+
623+
def assert_ruby_status(*args, **kwargs)
624+
super(*args, timeout: 60, **kwargs)
621625
end
622626
end

test/ruby/test_gc_compact.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def add_ivars
364364
def test_compact_objects_of_varying_sizes
365365
omit if GC::INTERNAL_CONSTANTS[:SIZE_POOL_COUNT] == 1
366366

367-
assert_separately([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
367+
assert_ruby_status([], "#{<<~"begin;"}\n#{<<~"end;"}", timeout: 10)
368368
begin;
369369
$objects = []
370370
160.times do |n|

test/ruby/test_lambda.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def self.b
163163
end
164164

165165
def test_proc_inside_lambda_toplevel
166-
assert_separately [], <<~RUBY
166+
assert_ruby_status [], <<~RUBY
167167
lambda{
168168
$g = proc{ return :pr }
169169
}.call

test/ruby/test_module.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def b; 2 end
583583
end
584584

585585
def test_gc_prepend_chain
586-
assert_separately([], <<-EOS)
586+
assert_ruby_status([], <<-EOS)
587587
10000.times { |i|
588588
m1 = Module.new do
589589
def foo; end
@@ -3073,7 +3073,7 @@ def test_return_value_of_define_singleton_method
30733073
end
30743074

30753075
def test_prepend_gc
3076-
assert_separately [], %{
3076+
assert_ruby_status [], %{
30773077
module Foo
30783078
end
30793079
class Object

0 commit comments

Comments
 (0)