mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[Backport #21638] Mark ractor-local $VERBOSE and $DEBUG
https://github.com/sampersand/blog/blob/master/the%20-s%20flag.md#the-segfault
This commit is contained in:
parent
c26a2b12e1
commit
f2fd5b3bc2
2
ractor.c
2
ractor.c
@ -217,6 +217,8 @@ ractor_mark(void *ptr)
|
||||
rb_gc_mark(r->r_stdin);
|
||||
rb_gc_mark(r->r_stdout);
|
||||
rb_gc_mark(r->r_stderr);
|
||||
rb_gc_mark(r->verbose);
|
||||
rb_gc_mark(r->debug);
|
||||
rb_hook_list_mark(&r->pub.hooks);
|
||||
|
||||
if (r->threads.cnt > 0) {
|
||||
|
||||
@ -573,6 +573,8 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||
|
||||
assert_in_out_err(%w(- -#=foo), "#!ruby -s\n", [],
|
||||
/invalid name for global variable - -# \(NameError\)/)
|
||||
|
||||
assert_in_out_err(['-s', '-e', 'GC.start; p $DEBUG', '--', '-DEBUG=x'], "", ['"x"'])
|
||||
end
|
||||
|
||||
def test_option_missing_argument
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user