summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-29 11:57:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-29 11:57:14 +0000
commitc463366dfd75056885028a95e8e2fc6e135d9194 (patch)
tree684f70d3ecfe562d0a3c48d29c69309f7ac92748 /ext
parent26de0b131e57952d29664de4453e2f04ec3df2bc (diff)
rb_funcallv
* *.c: rename rb_funcall2 to rb_funcallv, except for extensions which are/will be/may be gems. [Fix GH-1406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/-test-/funcall/passing_block.c2
-rw-r--r--ext/-test-/notimplement/bug.c2
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c2
-rw-r--r--ext/digest/digest.c2
-rw-r--r--ext/pathname/pathname.c20
-rw-r--r--ext/socket/unixsocket.c2
-rw-r--r--ext/win32ole/win32ole.c2
7 files changed, 16 insertions, 16 deletions
diff --git a/ext/-test-/funcall/passing_block.c b/ext/-test-/funcall/passing_block.c
index 0200f803695..70cb2108312 100644
--- a/ext/-test-/funcall/passing_block.c
+++ b/ext/-test-/funcall/passing_block.c
@@ -5,7 +5,7 @@ VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
static VALUE
with_funcall2(int argc, VALUE *argv, VALUE self)
{
- return rb_funcall2(self, rb_intern("target"), argc, argv);
+ return rb_funcallv(self, rb_intern("target"), argc, argv);
}
static VALUE
diff --git a/ext/-test-/notimplement/bug.c b/ext/-test-/notimplement/bug.c
index 34731bc2e60..8e9cae707a5 100644
--- a/ext/-test-/notimplement/bug.c
+++ b/ext/-test-/notimplement/bug.c
@@ -4,7 +4,7 @@ static VALUE
bug_funcall(int argc, VALUE *argv, VALUE self)
{
if (argc < 1) rb_raise(rb_eArgError, "not enough argument");
- return rb_funcall2(self, rb_to_id(*argv), argc-1, argv+1);
+ return rb_funcallv(self, rb_to_id(*argv), argc-1, argv+1);
}
void
diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c
index 4b8263de5a9..8f436908d3a 100644
--- a/ext/digest/bubblebabble/bubblebabble.c
+++ b/ext/digest/bubblebabble/bubblebabble.c
@@ -101,7 +101,7 @@ rb_digest_s_bubblebabble(VALUE klass, VALUE str)
static VALUE
rb_digest_class_s_bubblebabble(int argc, VALUE *argv, VALUE klass)
{
- return bubblebabble_str_new(rb_funcall2(klass, id_digest, argc, argv));
+ return bubblebabble_str_new(rb_funcallv(klass, id_digest, argc, argv));
}
/* Document-method: Digest::Instance#bubblebabble
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index a02eb12cd6f..012c0cc89d8 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -486,7 +486,7 @@ rb_digest_class_s_digest(int argc, VALUE *argv, VALUE klass)
static VALUE
rb_digest_class_s_hexdigest(int argc, VALUE *argv, VALUE klass)
{
- return hexencode_str_new(rb_funcall2(klass, id_digest, argc, argv));
+ return hexencode_str_new(rb_funcallv(klass, id_digest, argc, argv));
}
/* :nodoc: */
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index d560e7356f5..4fe88593538 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -202,7 +202,7 @@ path_sub(int argc, VALUE *argv, VALUE self)
str = rb_block_call(str, rb_intern("sub"), argc, argv, 0, 0);
}
else {
- str = rb_funcall2(str, rb_intern("sub"), argc, argv);
+ str = rb_funcallv(str, rb_intern("sub"), argc, argv);
}
return rb_class_new_instance(1, &str, rb_obj_class(self));
}
@@ -299,7 +299,7 @@ path_each_line(int argc, VALUE *argv, VALUE self)
return rb_block_call(rb_cIO, rb_intern("foreach"), 1+n, args, 0, 0);
}
else {
- return rb_funcall2(rb_cIO, rb_intern("foreach"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("foreach"), 1+n, args);
}
}
@@ -321,7 +321,7 @@ path_read(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcall2(rb_cIO, rb_intern("read"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("read"), 1+n, args);
}
/*
@@ -341,7 +341,7 @@ path_binread(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "02", &args[1], &args[2]);
- return rb_funcall2(rb_cIO, rb_intern("binread"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("binread"), 1+n, args);
}
/*
@@ -362,7 +362,7 @@ path_write(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcall2(rb_cIO, rb_intern("write"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("write"), 1+n, args);
}
/*
@@ -383,7 +383,7 @@ path_binwrite(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcall2(rb_cIO, rb_intern("binwrite"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("binwrite"), 1+n, args);
}
/*
@@ -405,7 +405,7 @@ path_readlines(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
- return rb_funcall2(rb_cIO, rb_intern("readlines"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("readlines"), 1+n, args);
}
/*
@@ -423,7 +423,7 @@ path_sysopen(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "02", &args[1], &args[2]);
- return rb_funcall2(rb_cIO, rb_intern("sysopen"), 1+n, args);
+ return rb_funcallv(rb_cIO, rb_intern("sysopen"), 1+n, args);
}
/*
@@ -608,7 +608,7 @@ path_open(int argc, VALUE *argv, VALUE self)
return rb_block_call(rb_cFile, rb_intern("open"), 1+n, args, 0, 0);
}
else {
- return rb_funcall2(rb_cFile, rb_intern("open"), 1+n, args);
+ return rb_funcallv(rb_cFile, rb_intern("open"), 1+n, args);
}
}
@@ -1013,7 +1013,7 @@ path_s_glob(int argc, VALUE *argv, VALUE klass)
else {
VALUE ary;
long i;
- ary = rb_funcall2(rb_cDir, rb_intern("glob"), n, args);
+ ary = rb_funcallv(rb_cDir, rb_intern("glob"), n, args);
ary = rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
for (i = 0; i < RARRAY_LEN(ary); i++) {
VALUE elt = RARRAY_AREF(ary, i);
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index f73f12777c2..d1cf1e2b2a7 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -422,7 +422,7 @@ unix_recv_io(int argc, VALUE *argv, VALUE sock)
ff_argc = mode == Qnil ? 1 : 2;
ff_argv[0] = INT2FIX(fd);
ff_argv[1] = mode;
- return rb_funcall2(klass, for_fd, ff_argc, ff_argv);
+ return rb_funcallv(klass, for_fd, ff_argc, ff_argv);
}
}
#else
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 4dcd22e6f03..229780d565c 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -383,7 +383,7 @@ static /* [local] */ HRESULT ( STDMETHODCALLTYPE Invoke )(
mid = rb_intern("value");
}
}
- v = rb_funcall2(p->obj, mid, args, parg);
+ v = rb_funcallv(p->obj, mid, args, parg);
ole_val2variant(v, pVarResult);
return S_OK;
}