Fix the last character index in an assertion
Also, when `RUBY_DEBUG` is enabled, objects allocated in shared-gc fail at `rb_ractor_confirm_belonging`, so assert it always.
This commit is contained in:
parent
ac2786757e
commit
c30a3ed027
2
gc.c
2
gc.c
@ -658,7 +658,7 @@ static void
|
|||||||
ruby_external_gc_init(void)
|
ruby_external_gc_init(void)
|
||||||
{
|
{
|
||||||
// Assert that the directory path ends with a /
|
// Assert that the directory path ends with a /
|
||||||
GC_ASSERT(SHARED_GC_DIR[strlen(SHARED_GC_DIR) - 2] == '/');
|
RUBY_ASSERT_ALWAYS(SHARED_GC_DIR[sizeof(SHARED_GC_DIR) - 2] == '/');
|
||||||
|
|
||||||
char *gc_so_file = getenv(RUBY_GC_LIBRARY);
|
char *gc_so_file = getenv(RUBY_GC_LIBRARY);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user