diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-09-30 18:17:42 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-09-30 18:17:42 +0900 |
| commit | c30a3ed027f2ea03d98aedf677368542ee6ca873 (patch) | |
| tree | 9ccb68d2b578db8e04c1dc8adfc5bcc0a9a4718d | |
| parent | ac2786757e1920fb2366a7331650acf6e328b2d6 (diff) | |
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.
| -rw-r--r-- | gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
