@@ -1506,7 +1506,7 @@ void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_
15061506 for (method_index = 0 ; method_index < methods_size ; ++ method_index )
15071507 {
15081508 VALUE rb_method = rb_ary_entry (methods , method_index );
1509- VALUE name = rb_funcallv (rb_method , rb_intern ( "id2name" ), 0 , NULL );
1509+ VALUE name = rb_sym2str (rb_method );
15101510 const char * method_name_str = RSTRING_PTR (name );
15111511
15121512 VALUE instance_method = rb_funcall (cls , rb_intern (method_type_str ), 1 , rb_method );
@@ -1551,7 +1551,7 @@ void rb_loader_impl_discover_methods(klass c, VALUE cls, const char *class_name_
15511551 if (RARRAY_LEN (parameter_pair ) == 2 )
15521552 {
15531553 VALUE parameter_name_id = rb_ary_entry (parameter_pair , 1 );
1554- VALUE parameter_name = rb_funcallv (parameter_name_id , rb_intern ( "id2name" ), 0 , NULL );
1554+ VALUE parameter_name = rb_sym2str (parameter_name_id );
15551555 const char * parameter_name_str = RSTRING_PTR (parameter_name );
15561556
15571557 signature_set (s , args_it , parameter_name_str , NULL );
@@ -1572,7 +1572,7 @@ void rb_loader_impl_discover_attributes(klass c, const char *class_name_str, VAL
15721572 for (attributes_index = 0 ; attributes_index < attributes_size ; ++ attributes_index )
15731573 {
15741574 VALUE rb_attr = rb_ary_entry (attributes , attributes_index );
1575- VALUE name = rb_funcallv (rb_attr , rb_intern ( "id2name" ), 0 , NULL );
1575+ VALUE name = rb_sym2str (rb_attr );
15761576 const char * attr_name_str = RSTRING_PTR (name );
15771577
15781578 log_write ("metacall" , LOG_LEVEL_DEBUG , "Attribute '%s' inside '%s'" , attr_name_str , class_name_str );
@@ -1606,12 +1606,9 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo
16061606
16071607 if (method != Qnil )
16081608 {
1609- VALUE method_name = rb_funcallv (method , rb_intern ("id2name" ), 0 , NULL );
1610-
1609+ VALUE method_name = rb_sym2str (method );
16111610 const char * method_name_str = RSTRING_PTR (method_name );
1612-
16131611 rb_function_parser function_parser = set_get (rb_module -> function_map , (set_key )method_name_str );
1614-
16151612 loader_impl_rb_function rb_function = NULL ;
16161613
16171614 if (function_parser == NULL )
@@ -1666,7 +1663,7 @@ int rb_loader_impl_discover_module(loader_impl impl, loader_impl_rb_module rb_mo
16661663 {
16671664 if (RB_TYPE_P (constant , T_SYMBOL ))
16681665 {
1669- VALUE class_name = rb_funcallv (constant , rb_intern ( "id2name" ), 0 , NULL );
1666+ VALUE class_name = rb_sym2str (constant );
16701667 const char * class_name_str = RSTRING_PTR (class_name );
16711668 VALUE cls = rb_const_get_from (rb_module -> module , rb_intern (class_name_str ));
16721669 loader_impl_rb_class rb_cls = malloc (sizeof (struct loader_impl_rb_class_type ));
0 commit comments