Skip to content

Commit

Permalink
Fix the last character index in an assertion
Browse files Browse the repository at this point in the history
Also, when `RUBY_DEBUG` is enabled, objects allocated in shared-gc
fail at `rb_ractor_confirm_belonging`, so assert it always.
  • Loading branch information
nobu committed Sep 30, 2024
1 parent ac27867 commit c30a3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static void
ruby_external_gc_init(void)
{
// 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);

Expand Down

0 comments on commit c30a3ed

Please sign in to comment.