diff --git a/compile.c b/compile.c index fd0af93c76..5ba4af476a 100644 --- a/compile.c +++ b/compile.c @@ -8062,7 +8062,7 @@ iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt) if (RTEST(opt)) { VALUE opt_str = rb_check_string_type(opt); - header.extra_size = (unsigned int)RSTRING_LEN(opt_str) + 1; + header.extra_size = RSTRING_LENINT(opt_str) + 1; ibf_dump_write(&dump, RSTRING_PTR(opt_str), header.extra_size); } else { diff --git a/vm_core.h b/vm_core.h index 8c6456abda..89a242acc6 100644 --- a/vm_core.h +++ b/vm_core.h @@ -410,18 +410,18 @@ struct rb_iseq_struct { #if USE_LAZY_LOAD const rb_iseq_t *rb_iseq_complete(const rb_iseq_t *iseq); +#endif static inline const rb_iseq_t * rb_iseq_check(const rb_iseq_t *iseq) { +#if USE_LAZY_LOAD if (iseq->body == NULL) { rb_iseq_complete((rb_iseq_t *)iseq); } +#endif return iseq; } -#else -#define rb_iseq_check(iseq) iseq -#endif enum ruby_special_exceptions { ruby_error_reenter,