Skip to content

Commit c30a3ed

Browse files
committed
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.
1 parent ac27867 commit c30a3ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static void
658658
ruby_external_gc_init(void)
659659
{
660660
// Assert that the directory path ends with a /
661-
GC_ASSERT(SHARED_GC_DIR[strlen(SHARED_GC_DIR) - 2] == '/');
661+
RUBY_ASSERT_ALWAYS(SHARED_GC_DIR[sizeof(SHARED_GC_DIR) - 2] == '/');
662662

663663
char *gc_so_file = getenv(RUBY_GC_LIBRARY);
664664

0 commit comments

Comments
 (0)