Skip to content

Commit 52a8c02

Browse files
committed
just wrap rb_method_basic_definition_p
1 parent 1e51c78 commit 52a8c02

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

insns.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ opt_string_new
965965

966966
if (recv == rb_cString &&
967967
vm_method_cfunc_is(GET_CFP(), cd, recv, rb_class_new_instance_pass_kw) &&
968-
vm_cstr_initialize_basic_p(recv)) {
968+
vm_method_basic_definition_p(recv, idInitialize)) {
969969

970970
if (argc == 0) {
971971
str = rb_str_buf_new(0);

vm_insnhelper.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,13 +2368,10 @@ rb_zjit_cme_is_cfunc(const rb_callable_method_entry_t *me, const cfunc_type func
23682368
return check_cfunc(me, func);
23692369
}
23702370

2371-
// True while String#initialize is still the builtin definition. opt_string_new
2372-
// skips the initialize call entirely, so it must bail to the generic path once
2373-
// a user redefines it.
23742371
static inline bool
2375-
vm_cstr_initialize_basic_p(VALUE recv)
2372+
vm_method_basic_definition_p(VALUE recv, ID id)
23762373
{
2377-
return rb_method_basic_definition_p(recv, idInitialize);
2374+
return rb_method_basic_definition_p(recv, id);
23782375
}
23792376

23802377
int

0 commit comments

Comments
 (0)