File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -10737,13 +10737,12 @@ pub fn yjit_reg_method_codegen_fns() {
1073710737/// and do not make method calls.
1073810738///
1073910739/// See also: [lookup_cfunc_codegen].
10740- fn reg_method_codegen ( klass : VALUE , mid_str : & str , gen_fn : MethodGenFn ) {
10741- let id_string = std:: ffi:: CString :: new ( mid_str) . expect ( "couldn't convert to CString!" ) ;
10742- let mid = unsafe { rb_intern ( id_string. as_ptr ( ) ) } ;
10740+ fn reg_method_codegen ( klass : VALUE , method_name : & str , gen_fn : MethodGenFn ) {
10741+ let mid = unsafe { rb_intern2 ( method_name. as_ptr ( ) . cast ( ) , method_name. len ( ) . try_into ( ) . unwrap ( ) ) } ;
1074310742 let me = unsafe { rb_method_entry_at ( klass, mid) } ;
1074410743
1074510744 if me. is_null ( ) {
10746- panic ! ( "undefined optimized method!: {mid_str }" ) ;
10745+ panic ! ( "undefined optimized method!: {method_name }" ) ;
1074710746 }
1074810747
1074910748 // For now, only cfuncs are supported (me->cme cast fine since it's just me->def->type).
You can’t perform that action at this time.
0 commit comments