mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	use rb_funcallv
* use rb_funcallv() for no arguments call instead of variadic rb_funcall(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									745737e769
								
							
						
					
					
						commit
						16294913f7
					
				
					 15 changed files with 64 additions and 64 deletions
				
			
		
							
								
								
									
										2
									
								
								class.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								class.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1915,7 +1915,7 @@ unknown_keyword_error(VALUE hash, const ID *table, int keywords)
 | 
			
		|||
	st_data_t key = ID2SYM(table[i]);
 | 
			
		||||
	st_delete(tbl, &key, NULL);
 | 
			
		||||
    }
 | 
			
		||||
    keys = rb_funcall(hash, rb_intern("keys"), 0, 0);
 | 
			
		||||
    keys = rb_funcallv(hash, rb_intern("keys"), 0, 0);
 | 
			
		||||
    if (!RB_TYPE_P(keys, T_ARRAY)) rb_raise(rb_eArgError, "unknown keyword");
 | 
			
		||||
    rb_keyword_error("unknown", keys);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								dir.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								dir.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -575,7 +575,7 @@ dir_inspect(VALUE dir)
 | 
			
		|||
	rb_str_cat2(str, ">");
 | 
			
		||||
	return str;
 | 
			
		||||
    }
 | 
			
		||||
    return rb_funcall(dir, rb_intern("to_s"), 0, 0);
 | 
			
		||||
    return rb_funcallv(dir, rb_intern("to_s"), 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_DIRFD
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -765,8 +765,8 @@ rb_enc_get_index(VALUE obj)
 | 
			
		|||
	}
 | 
			
		||||
	break;
 | 
			
		||||
      case T_FILE:
 | 
			
		||||
	tmp = rb_funcall(obj, rb_intern("internal_encoding"), 0, 0);
 | 
			
		||||
	if (NIL_P(tmp)) obj = rb_funcall(obj, rb_intern("external_encoding"), 0, 0);
 | 
			
		||||
	tmp = rb_funcallv(obj, rb_intern("internal_encoding"), 0, 0);
 | 
			
		||||
	if (NIL_P(tmp)) obj = rb_funcallv(obj, rb_intern("external_encoding"), 0, 0);
 | 
			
		||||
	else obj = tmp;
 | 
			
		||||
	if (NIL_P(obj)) break;
 | 
			
		||||
      case T_DATA:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								enum.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								enum.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -219,7 +219,7 @@ enum_find(int argc, VALUE *argv, VALUE obj)
 | 
			
		|||
	return memo->u1.value;
 | 
			
		||||
    }
 | 
			
		||||
    if (!NIL_P(if_none)) {
 | 
			
		||||
	return rb_funcall(if_none, id_call, 0, 0);
 | 
			
		||||
	return rb_funcallv(if_none, id_call, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
    return Qnil;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -2335,7 +2335,7 @@ zip_ary(RB_BLOCK_CALL_FUNC_ARGLIST(val, memoval))
 | 
			
		|||
static VALUE
 | 
			
		||||
call_next(VALUE *v)
 | 
			
		||||
{
 | 
			
		||||
    return v[0] = rb_funcall(v[1], id_next, 0, 0);
 | 
			
		||||
    return v[0] = rb_funcallv(v[1], id_next, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								error.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								error.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -745,7 +745,7 @@ exc_to_s(VALUE exc)
 | 
			
		|||
static VALUE
 | 
			
		||||
exc_message(VALUE exc)
 | 
			
		||||
{
 | 
			
		||||
    return rb_funcall(exc, idTo_s, 0, 0);
 | 
			
		||||
    return rb_funcallv(exc, idTo_s, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
| 
						 | 
				
			
			@ -1444,7 +1444,7 @@ syserr_eqq(VALUE self, VALUE exc)
 | 
			
		|||
 | 
			
		||||
    num = rb_attr_get(exc, id_errno);
 | 
			
		||||
    if (NIL_P(num)) {
 | 
			
		||||
	num = rb_funcall(exc, id_errno, 0, 0);
 | 
			
		||||
	num = rb_funcallv(exc, id_errno, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
    e = rb_const_get(self, id_Errno);
 | 
			
		||||
    if (FIXNUM_P(num) ? num == e : rb_equal(num, e))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -199,7 +199,7 @@ GetPrivPKeyPtr(VALUE obj)
 | 
			
		|||
{
 | 
			
		||||
    EVP_PKEY *pkey;
 | 
			
		||||
 | 
			
		||||
    if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
 | 
			
		||||
    if (rb_funcallv(obj, id_private_q, 0, NULL) != Qtrue) {
 | 
			
		||||
	ossl_raise(rb_eArgError, "Private key is needed.");
 | 
			
		||||
    }
 | 
			
		||||
    SafeGetPKey(obj, pkey);
 | 
			
		||||
| 
						 | 
				
			
			@ -223,7 +223,7 @@ DupPrivPKeyPtr(VALUE obj)
 | 
			
		|||
{
 | 
			
		||||
    EVP_PKEY *pkey;
 | 
			
		||||
 | 
			
		||||
    if (rb_funcall(obj, id_private_q, 0, NULL) != Qtrue) {
 | 
			
		||||
    if (rb_funcallv(obj, id_private_q, 0, NULL) != Qtrue) {
 | 
			
		||||
	ossl_raise(rb_eArgError, "Private key is needed.");
 | 
			
		||||
    }
 | 
			
		||||
    SafeGetPKey(obj, pkey);
 | 
			
		||||
| 
						 | 
				
			
			@ -290,7 +290,7 @@ ossl_pkey_sign(VALUE self, VALUE digest, VALUE data)
 | 
			
		|||
    unsigned int buf_len;
 | 
			
		||||
    VALUE str;
 | 
			
		||||
 | 
			
		||||
    if (rb_funcall(self, id_private_q, 0, NULL) != Qtrue) {
 | 
			
		||||
    if (rb_funcallv(self, id_private_q, 0, NULL) != Qtrue) {
 | 
			
		||||
	ossl_raise(rb_eArgError, "Private key is needed.");
 | 
			
		||||
    }
 | 
			
		||||
    GetPKey(self, pkey);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -150,7 +150,7 @@ sock_initialize(int argc, VALUE *argv, VALUE sock)
 | 
			
		|||
static VALUE
 | 
			
		||||
io_call_close(VALUE io)
 | 
			
		||||
{
 | 
			
		||||
    return rb_funcall(io, rb_intern("close"), 0, 0);
 | 
			
		||||
    return rb_funcallv(io, rb_intern("close"), 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1894,7 +1894,7 @@ set_max_block_time(self, time)
 | 
			
		|||
 | 
			
		||||
    default:
 | 
			
		||||
        {
 | 
			
		||||
	    VALUE tmp = rb_funcall(time, ID_inspect, 0, 0);
 | 
			
		||||
	    VALUE tmp = rb_funcallv(time, ID_inspect, 0, 0);
 | 
			
		||||
	    rb_raise(rb_eArgError, "invalid value for time: '%s'",
 | 
			
		||||
		     StringValuePtr(tmp));
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -3109,7 +3109,7 @@ ip_set_exc_message(interp, exc)
 | 
			
		|||
    thr_crit_bup = rb_thread_critical;
 | 
			
		||||
    rb_thread_critical = Qtrue;
 | 
			
		||||
 | 
			
		||||
    msg = rb_funcall(exc, ID_message, 0, 0);
 | 
			
		||||
    msg = rb_funcallv(exc, ID_message, 0, 0);
 | 
			
		||||
    StringValue(msg);
 | 
			
		||||
 | 
			
		||||
#if TCL_MAJOR_VERSION > 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION > 0)
 | 
			
		||||
| 
						 | 
				
			
			@ -3123,7 +3123,7 @@ ip_set_exc_message(interp, exc)
 | 
			
		|||
        /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
 | 
			
		||||
        encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(enc));
 | 
			
		||||
    } else {
 | 
			
		||||
        enc = rb_funcall(enc, ID_to_s, 0, 0);
 | 
			
		||||
        enc = rb_funcallv(enc, ID_to_s, 0, 0);
 | 
			
		||||
        /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
 | 
			
		||||
        encoding = Tcl_GetEncoding((Tcl_Interp*)NULL, RSTRING_PTR(enc));
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			@ -3176,11 +3176,11 @@ TkStringValue(obj)
 | 
			
		|||
 | 
			
		||||
    default:
 | 
			
		||||
        if (rb_respond_to(obj, ID_to_s)) {
 | 
			
		||||
            return rb_funcall(obj, ID_to_s, 0, 0);
 | 
			
		||||
            return rb_funcallv(obj, ID_to_s, 0, 0);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return rb_funcall(obj, ID_inspect, 0, 0);
 | 
			
		||||
    return rb_funcallv(obj, ID_inspect, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
| 
						 | 
				
			
			@ -3298,7 +3298,7 @@ tcl_protect_core(interp, proc, data) /* should not raise exception */
 | 
			
		|||
        rb_thread_critical = Qtrue;
 | 
			
		||||
 | 
			
		||||
        DUMP1("set backtrace");
 | 
			
		||||
        if (!NIL_P(backtrace = rb_funcall(exc, ID_backtrace, 0, 0))) {
 | 
			
		||||
        if (!NIL_P(backtrace = rb_funcallv(exc, ID_backtrace, 0, 0))) {
 | 
			
		||||
            backtrace = rb_ary_join(backtrace, rb_str_new2("\n"));
 | 
			
		||||
            Tcl_AddErrorInfo(interp, StringValuePtr(backtrace));
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -7245,7 +7245,7 @@ tk_funcall(func, argc, argv, obj)
 | 
			
		|||
        DUMP1("raise exception");
 | 
			
		||||
        /* rb_exc_raise(ret); */
 | 
			
		||||
	rb_exc_raise(rb_exc_new3(rb_obj_class(ret),
 | 
			
		||||
				 rb_funcall(ret, ID_to_s, 0, 0)));
 | 
			
		||||
				 rb_funcallv(ret, ID_to_s, 0, 0)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    DUMP1("exit tk_funcall");
 | 
			
		||||
| 
						 | 
				
			
			@ -7722,7 +7722,7 @@ ip_eval(self, str)
 | 
			
		|||
        DUMP1("raise exception");
 | 
			
		||||
        /* rb_exc_raise(ret); */
 | 
			
		||||
	rb_exc_raise(rb_exc_new3(rb_obj_class(ret),
 | 
			
		||||
				 rb_funcall(ret, ID_to_s, 0, 0)));
 | 
			
		||||
				 rb_funcallv(ret, ID_to_s, 0, 0)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return ret;
 | 
			
		||||
| 
						 | 
				
			
			@ -7949,7 +7949,7 @@ lib_toUTF8_core(ip_obj, src, encodename)
 | 
			
		|||
            volatile VALUE enc;
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_RUBY_ENCODING_H
 | 
			
		||||
            enc = rb_funcall(rb_obj_encoding(str), ID_to_s, 0, 0);
 | 
			
		||||
            enc = rb_funcallv(rb_obj_encoding(str), ID_to_s, 0, 0);
 | 
			
		||||
#else
 | 
			
		||||
            enc = rb_attr_get(str, ID_at_enc);
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			@ -7962,7 +7962,7 @@ lib_toUTF8_core(ip_obj, src, encodename)
 | 
			
		|||
                        encoding = (Tcl_Encoding)NULL;
 | 
			
		||||
                    } else {
 | 
			
		||||
                        /* StringValue(enc); */
 | 
			
		||||
                        enc = rb_funcall(enc, ID_to_s, 0, 0);
 | 
			
		||||
                        enc = rb_funcallv(enc, ID_to_s, 0, 0);
 | 
			
		||||
                        /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
 | 
			
		||||
			if (!RSTRING_LEN(enc)) {
 | 
			
		||||
			  encoding = (Tcl_Encoding)NULL;
 | 
			
		||||
| 
						 | 
				
			
			@ -8153,7 +8153,7 @@ lib_fromUTF8_core(ip_obj, src, encodename)
 | 
			
		|||
                encoding = (Tcl_Encoding)NULL;
 | 
			
		||||
            } else {
 | 
			
		||||
                /* StringValue(enc); */
 | 
			
		||||
                enc = rb_funcall(enc, ID_to_s, 0, 0);
 | 
			
		||||
                enc = rb_funcallv(enc, ID_to_s, 0, 0);
 | 
			
		||||
                /* encoding = Tcl_GetEncoding(interp, RSTRING_PTR(enc)); */
 | 
			
		||||
		if (!RSTRING_LEN(enc)) {
 | 
			
		||||
		  encoding = (Tcl_Encoding)NULL;
 | 
			
		||||
| 
						 | 
				
			
			@ -8408,7 +8408,7 @@ lib_set_system_encoding(self, enc_name)
 | 
			
		|||
        return lib_get_system_encoding(self);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    enc_name = rb_funcall(enc_name, ID_to_s, 0, 0);
 | 
			
		||||
    enc_name = rb_funcallv(enc_name, ID_to_s, 0, 0);
 | 
			
		||||
    if (Tcl_SetSystemEncoding((Tcl_Interp *)NULL,
 | 
			
		||||
                              StringValuePtr(enc_name)) != TCL_OK) {
 | 
			
		||||
        rb_raise(rb_eArgError, "unknown encoding name '%s'",
 | 
			
		||||
| 
						 | 
				
			
			@ -9218,7 +9218,7 @@ ip_invoke_with_position(argc, argv, obj, position)
 | 
			
		|||
        DUMP1("raise exception");
 | 
			
		||||
        /* rb_exc_raise(ret); */
 | 
			
		||||
	rb_exc_raise(rb_exc_new3(rb_obj_class(ret),
 | 
			
		||||
				 rb_funcall(ret, ID_to_s, 0, 0)));
 | 
			
		||||
				 rb_funcallv(ret, ID_to_s, 0, 0)));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    DUMP1("exit ip_invoke");
 | 
			
		||||
| 
						 | 
				
			
			@ -10187,7 +10187,7 @@ encoding_table_get_name_core(table, enc_arg, error_mode)
 | 
			
		|||
  /* 1st: default encoding setting of interp */
 | 
			
		||||
  if (ptr && NIL_P(enc)) {
 | 
			
		||||
    if (rb_respond_to(interp, ID_encoding_name)) {
 | 
			
		||||
      enc = rb_funcall(interp, ID_encoding_name, 0, 0);
 | 
			
		||||
      enc = rb_funcallv(interp, ID_encoding_name, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  /* 2nd: Encoding.default_internal */
 | 
			
		||||
| 
						 | 
				
			
			@ -10230,7 +10230,7 @@ encoding_table_get_name_core(table, enc_arg, error_mode)
 | 
			
		|||
 | 
			
		||||
  } else {
 | 
			
		||||
    /* String or Symbol? */
 | 
			
		||||
    name = rb_funcall(enc, ID_to_s, 0, 0);
 | 
			
		||||
    name = rb_funcallv(enc, ID_to_s, 0, 0);
 | 
			
		||||
 | 
			
		||||
    if (!NIL_P(rb_hash_lookup(table, name))) {
 | 
			
		||||
      /* find */
 | 
			
		||||
| 
						 | 
				
			
			@ -10264,7 +10264,7 @@ encoding_table_get_name_core(table, enc_arg, error_mode)
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  if (RTEST(error_mode)) {
 | 
			
		||||
    enc = rb_funcall(enc_arg, ID_to_s, 0, 0);
 | 
			
		||||
    enc = rb_funcallv(enc_arg, ID_to_s, 0, 0);
 | 
			
		||||
    rb_raise(rb_eArgError, "unsupported Tk encoding '%s'", RSTRING_PTR(enc));
 | 
			
		||||
  }
 | 
			
		||||
  return Qnil;
 | 
			
		||||
| 
						 | 
				
			
			@ -10342,7 +10342,7 @@ encoding_table_get_name_core(table, enc, error_mode)
 | 
			
		|||
{
 | 
			
		||||
  volatile VALUE name = Qnil;
 | 
			
		||||
 | 
			
		||||
  enc = rb_funcall(enc, ID_to_s, 0, 0);
 | 
			
		||||
  enc = rb_funcallv(enc, ID_to_s, 0, 0);
 | 
			
		||||
  name = rb_hash_lookup(table, enc);
 | 
			
		||||
 | 
			
		||||
  if (!NIL_P(name)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -172,7 +172,7 @@ tk_install_cmd_core(cmd)
 | 
			
		|||
    volatile VALUE id_num;
 | 
			
		||||
 | 
			
		||||
    id_num = ULONG2NUM(CALLBACK_ID_NUM++);
 | 
			
		||||
    id_num = rb_funcall(id_num, ID_to_s, 0, 0);
 | 
			
		||||
    id_num = rb_funcallv(id_num, ID_to_s, 0, 0);
 | 
			
		||||
    id_num = rb_str_append(rb_str_new2(cmd_id_prefix), id_num);
 | 
			
		||||
    rb_hash_aset(CALLBACK_TABLE, id_num, cmd);
 | 
			
		||||
    return rb_str_append(rb_str_new2(cmd_id_head), id_num);
 | 
			
		||||
| 
						 | 
				
			
			@ -269,7 +269,7 @@ to_strkey(key, value, hash)
 | 
			
		|||
    VALUE value;
 | 
			
		||||
    VALUE hash;
 | 
			
		||||
{
 | 
			
		||||
    rb_hash_aset(hash, rb_funcall(key, ID_to_s, 0, 0), value);
 | 
			
		||||
    rb_hash_aset(hash, rb_funcallv(key, ID_to_s, 0, 0), value);
 | 
			
		||||
    return ST_CHECK;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -306,10 +306,10 @@ ary2list(ary, enc_flag, self)
 | 
			
		|||
    volatile VALUE dst;
 | 
			
		||||
    volatile VALUE sys_enc, dst_enc, str_enc;
 | 
			
		||||
 | 
			
		||||
    sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0);
 | 
			
		||||
    sys_enc = rb_funcallv(cTclTkLib, ID_encoding, 0, 0);
 | 
			
		||||
    if (NIL_P(sys_enc)) {
 | 
			
		||||
      sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0);
 | 
			
		||||
      sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0);
 | 
			
		||||
      sys_enc = rb_funcallv(cTclTkLib, ID_encoding_system, 0, 0);
 | 
			
		||||
      sys_enc = rb_funcallv(sys_enc, ID_to_s, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (NIL_P(enc_flag)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -319,7 +319,7 @@ ary2list(ary, enc_flag, self)
 | 
			
		|||
        dst_enc = enc_flag;
 | 
			
		||||
        req_chk_flag = 0;
 | 
			
		||||
    } else {
 | 
			
		||||
        dst_enc = rb_funcall(enc_flag, ID_to_s, 0, 0);
 | 
			
		||||
        dst_enc = rb_funcallv(enc_flag, ID_to_s, 0, 0);
 | 
			
		||||
        req_chk_flag = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -345,7 +345,7 @@ ary2list(ary, enc_flag, self)
 | 
			
		|||
            if (req_chk_flag) {
 | 
			
		||||
                str_enc = rb_ivar_get(str_val, ID_at_enc);
 | 
			
		||||
                if (!NIL_P(str_enc)) {
 | 
			
		||||
                    str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                    str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                } else {
 | 
			
		||||
                    str_enc = sys_enc;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -392,7 +392,7 @@ ary2list(ary, enc_flag, self)
 | 
			
		|||
                if (req_chk_flag) {
 | 
			
		||||
                    str_enc = rb_ivar_get(str_val, ID_at_enc);
 | 
			
		||||
                    if (!NIL_P(str_enc)) {
 | 
			
		||||
                        str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                        str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                    } else {
 | 
			
		||||
                        str_enc = sys_enc;
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			@ -412,7 +412,7 @@ ary2list(ary, enc_flag, self)
 | 
			
		|||
                if (req_chk_flag) {
 | 
			
		||||
                    str_enc = rb_ivar_get(str_val, ID_at_enc);
 | 
			
		||||
                    if (!NIL_P(str_enc)) {
 | 
			
		||||
                        str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                        str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                    } else {
 | 
			
		||||
                        str_enc = sys_enc;
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			@ -460,10 +460,10 @@ ary2list2(ary, enc_flag, self)
 | 
			
		|||
    volatile VALUE dst;
 | 
			
		||||
    volatile VALUE sys_enc, dst_enc, str_enc;
 | 
			
		||||
 | 
			
		||||
    sys_enc = rb_funcall(cTclTkLib, ID_encoding, 0, 0);
 | 
			
		||||
    sys_enc = rb_funcallv(cTclTkLib, ID_encoding, 0, 0);
 | 
			
		||||
    if (NIL_P(sys_enc)) {
 | 
			
		||||
      sys_enc = rb_funcall(cTclTkLib, ID_encoding_system, 0, 0);
 | 
			
		||||
      sys_enc = rb_funcall(sys_enc, ID_to_s, 0, 0);
 | 
			
		||||
      sys_enc = rb_funcallv(cTclTkLib, ID_encoding_system, 0, 0);
 | 
			
		||||
      sys_enc = rb_funcallv(sys_enc, ID_to_s, 0, 0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (NIL_P(enc_flag)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -473,7 +473,7 @@ ary2list2(ary, enc_flag, self)
 | 
			
		|||
        dst_enc = enc_flag;
 | 
			
		||||
        req_chk_flag = 0;
 | 
			
		||||
    } else {
 | 
			
		||||
        dst_enc = rb_funcall(enc_flag, ID_to_s, 0, 0);
 | 
			
		||||
        dst_enc = rb_funcallv(enc_flag, ID_to_s, 0, 0);
 | 
			
		||||
        req_chk_flag = 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -507,7 +507,7 @@ ary2list2(ary, enc_flag, self)
 | 
			
		|||
            if (req_chk_flag) {
 | 
			
		||||
                str_enc = rb_ivar_get(str_val, ID_at_enc);
 | 
			
		||||
                if (!NIL_P(str_enc)) {
 | 
			
		||||
                    str_enc = rb_funcall(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                    str_enc = rb_funcallv(str_enc, ID_to_s, 0, 0);
 | 
			
		||||
                } else {
 | 
			
		||||
                    str_enc = sys_enc;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -546,7 +546,7 @@ static VALUE
 | 
			
		|||
key2keyname(key)
 | 
			
		||||
    VALUE key;
 | 
			
		||||
{
 | 
			
		||||
    return rb_str_append(rb_str_new2("-"), rb_funcall(key, ID_to_s, 0, 0));
 | 
			
		||||
    return rb_str_append(rb_str_new2("-"), rb_funcallv(key, ID_to_s, 0, 0));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
| 
						 | 
				
			
			@ -817,7 +817,7 @@ get_eval_string_core(obj, enc_flag, self)
 | 
			
		|||
    case T_FLOAT:
 | 
			
		||||
    case T_FIXNUM:
 | 
			
		||||
    case T_BIGNUM:
 | 
			
		||||
        return rb_funcall(obj, ID_to_s, 0, 0);
 | 
			
		||||
        return rb_funcallv(obj, ID_to_s, 0, 0);
 | 
			
		||||
 | 
			
		||||
    case T_STRING:
 | 
			
		||||
        if (RTEST(enc_flag)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -866,12 +866,12 @@ get_eval_string_core(obj, enc_flag, self)
 | 
			
		|||
        return rb_str_new2("");
 | 
			
		||||
 | 
			
		||||
    case T_REGEXP:
 | 
			
		||||
        return rb_funcall(obj, ID_source, 0, 0);
 | 
			
		||||
        return rb_funcallv(obj, ID_source, 0, 0);
 | 
			
		||||
 | 
			
		||||
    default:
 | 
			
		||||
        if (rb_obj_is_kind_of(obj, cTkObject)) {
 | 
			
		||||
            /* return rb_str_new3(rb_funcall(obj, ID_path, 0, 0)); */
 | 
			
		||||
            return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
 | 
			
		||||
            /* return rb_str_new3(rb_funcallv(obj, ID_path, 0, 0)); */
 | 
			
		||||
            return get_eval_string_core(rb_funcallv(obj, ID_path, 0, 0),
 | 
			
		||||
                                        enc_flag, self);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -888,15 +888,15 @@ get_eval_string_core(obj, enc_flag, self)
 | 
			
		|||
        if (obj == TK_None)  return Qnil;
 | 
			
		||||
 | 
			
		||||
        if (rb_obj_respond_to(obj, ID_to_eval, Qtrue)) {
 | 
			
		||||
            /* return rb_funcall(obj, ID_to_eval, 0, 0); */
 | 
			
		||||
            return get_eval_string_core(rb_funcall(obj, ID_to_eval, 0, 0),
 | 
			
		||||
            /* return rb_funcallv(obj, ID_to_eval, 0, 0); */
 | 
			
		||||
            return get_eval_string_core(rb_funcallv(obj, ID_to_eval, 0, 0),
 | 
			
		||||
                                        enc_flag, self);
 | 
			
		||||
        } else if (rb_obj_respond_to(obj, ID_path, Qtrue)) {
 | 
			
		||||
            /* return rb_funcall(obj, ID_path, 0, 0); */
 | 
			
		||||
            return get_eval_string_core(rb_funcall(obj, ID_path, 0, 0),
 | 
			
		||||
            /* return rb_funcallv(obj, ID_path, 0, 0); */
 | 
			
		||||
            return get_eval_string_core(rb_funcallv(obj, ID_path, 0, 0),
 | 
			
		||||
                                        enc_flag, self);
 | 
			
		||||
        } else if (rb_obj_respond_to(obj, ID_to_s, Qtrue)) {
 | 
			
		||||
            return rb_funcall(obj, ID_to_s, 0, 0);
 | 
			
		||||
            return rb_funcallv(obj, ID_to_s, 0, 0);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -614,7 +614,7 @@ num_zero_p(VALUE num)
 | 
			
		|||
static VALUE
 | 
			
		||||
num_nonzero_p(VALUE num)
 | 
			
		||||
{
 | 
			
		||||
    if (RTEST(rb_funcall(num, rb_intern("zero?"), 0, 0))) {
 | 
			
		||||
    if (RTEST(rb_funcallv(num, rb_intern("zero?"), 0, 0))) {
 | 
			
		||||
	return Qnil;
 | 
			
		||||
    }
 | 
			
		||||
    return num;
 | 
			
		||||
| 
						 | 
				
			
			@ -634,7 +634,7 @@ num_nonzero_p(VALUE num)
 | 
			
		|||
static VALUE
 | 
			
		||||
num_to_int(VALUE num)
 | 
			
		||||
{
 | 
			
		||||
    return rb_funcall(num, id_to_i, 0, 0);
 | 
			
		||||
    return rb_funcallv(num, id_to_i, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								object.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								object.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -471,7 +471,7 @@ rb_any_to_s(VALUE obj)
 | 
			
		|||
VALUE
 | 
			
		||||
rb_inspect(VALUE obj)
 | 
			
		||||
{
 | 
			
		||||
    VALUE str = rb_obj_as_string(rb_funcall(obj, id_inspect, 0, 0));
 | 
			
		||||
    VALUE str = rb_obj_as_string(rb_funcallv(obj, id_inspect, 0, 0));
 | 
			
		||||
    rb_encoding *ext = rb_default_external_encoding();
 | 
			
		||||
    if (!rb_enc_asciicompat(ext)) {
 | 
			
		||||
	if (!rb_enc_str_asciionly_p(str))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								parse.y
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								parse.y
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -9750,7 +9750,7 @@ negate_lit(VALUE lit)
 | 
			
		|||
      case T_BIGNUM:
 | 
			
		||||
      case T_RATIONAL:
 | 
			
		||||
      case T_COMPLEX:
 | 
			
		||||
	lit = rb_funcall(lit,tUMINUS,0,0);
 | 
			
		||||
	lit = rb_funcallv(lit, tUMINUS, 0, 0);
 | 
			
		||||
	break;
 | 
			
		||||
      case T_FLOAT:
 | 
			
		||||
#if USE_FLONUM
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								proc.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								proc.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2306,13 +2306,13 @@ method_inspect(VALUE method)
 | 
			
		|||
static VALUE
 | 
			
		||||
mproc(VALUE method)
 | 
			
		||||
{
 | 
			
		||||
    return rb_funcall2(rb_mRubyVMFrozenCore, idProc, 0, 0);
 | 
			
		||||
    return rb_funcallv(rb_mRubyVMFrozenCore, idProc, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
mlambda(VALUE method)
 | 
			
		||||
{
 | 
			
		||||
    return rb_funcall(rb_mRubyVMFrozenCore, idLambda, 0, 0);
 | 
			
		||||
    return rb_funcallv(rb_mRubyVMFrozenCore, idLambda, 0, 0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static VALUE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								range.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								range.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -273,7 +273,7 @@ range_each_func(VALUE range, rb_block_call_func *func, VALUE arg)
 | 
			
		|||
    if (EXCL(range)) {
 | 
			
		||||
	while (r_lt(v, e)) {
 | 
			
		||||
	    (*func) (v, arg, 0, 0, 0);
 | 
			
		||||
	    v = rb_funcall(v, id_succ, 0, 0);
 | 
			
		||||
	    v = rb_funcallv(v, id_succ, 0, 0);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
| 
						 | 
				
			
			@ -281,7 +281,7 @@ range_each_func(VALUE range, rb_block_call_func *func, VALUE arg)
 | 
			
		|||
	    (*func) (v, arg, 0, 0, 0);
 | 
			
		||||
	    if (c == (int)INT2FIX(0))
 | 
			
		||||
		break;
 | 
			
		||||
	    v = rb_funcall(v, id_succ, 0, 0);
 | 
			
		||||
	    v = rb_funcallv(v, id_succ, 0, 0);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								string.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								string.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -3534,7 +3534,7 @@ rb_str_upto(int argc, VALUE *argv, VALUE beg)
 | 
			
		|||
	    while (rb_funcall(b, op, 1, e)) {
 | 
			
		||||
		args[1] = b;
 | 
			
		||||
		rb_yield(rb_str_format(numberof(args), args, fmt));
 | 
			
		||||
		b = rb_funcall(b, succ, 0, 0);
 | 
			
		||||
		b = rb_funcallv(b, succ, 0, 0);
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
	return beg;
 | 
			
		||||
| 
						 | 
				
			
			@ -3544,12 +3544,12 @@ rb_str_upto(int argc, VALUE *argv, VALUE beg)
 | 
			
		|||
    n = rb_str_cmp(beg, end);
 | 
			
		||||
    if (n > 0 || (excl && n == 0)) return beg;
 | 
			
		||||
 | 
			
		||||
    after_end = rb_funcall(end, succ, 0, 0);
 | 
			
		||||
    after_end = rb_funcallv(end, succ, 0, 0);
 | 
			
		||||
    current = rb_str_dup(beg);
 | 
			
		||||
    while (!rb_str_equal(current, after_end)) {
 | 
			
		||||
	VALUE next = Qnil;
 | 
			
		||||
	if (excl || !rb_str_equal(current, end))
 | 
			
		||||
	    next = rb_funcall(current, succ, 0, 0);
 | 
			
		||||
	    next = rb_funcallv(current, succ, 0, 0);
 | 
			
		||||
	rb_yield(current);
 | 
			
		||||
	if (NIL_P(next)) break;
 | 
			
		||||
	current = next;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue