diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-04-12 11:47:30 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-04-12 11:47:30 +0900 |
| commit | 4affbf79ba624fe6861f955593dd0fe54b0a62a9 (patch) | |
| tree | c4f55d14f5b24735809a59a66ebb3ae61b9f7933 | |
| parent | bf008f0783f309db61b9e1d0f2fc52a207a4a5a8 (diff) | |
Fixed the error message for `ibf_load_builtin`
`ibf_load_ptr` returns a pointer to the loaded data without a NUL
terminator. Like as the debug output above, the length of the loaded
data must explicitly specified.
| -rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -12920,7 +12920,8 @@ ibf_load_builtin(const struct ibf_load *load, ibf_offset_t *offset) const struct rb_builtin_function *table = GET_VM()->builtin_function_table; if (table == NULL) rb_raise(rb_eArgError, "builtin function table is not provided"); if (strncmp(table[i].name, name, len) != 0) { - rb_raise(rb_eArgError, "builtin function index (%d) mismatch (expect %s but %s)", i, name, table[i].name); + rb_raise(rb_eArgError, "builtin function index (%d) mismatch (expect %.*s but %s)", + i, len, name, table[i].name); } // fprintf(stderr, "load-builtin: name:%s(%d)\n", table[i].name, table[i].argc); |
