summaryrefslogtreecommitdiff
path: root/enumerator.c
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 /enumerator.c
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 'enumerator.c')
-rw-r--r--enumerator.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/enumerator.c b/enumerator.c
index 2d692e5..7b83af4 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -1528,7 +1528,7 @@ lazy_map(VALUE obj)
static VALUE
lazy_flat_map_i(RB_BLOCK_CALL_FUNC_ARGLIST(i, yielder))
{
- return rb_funcall2(yielder, id_yield, argc, argv);
+ return rb_funcallv(yielder, id_yield, argc, argv);
}
static VALUE
@@ -1830,7 +1830,7 @@ lazy_take_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
memo = args;
}
- rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
+ rb_funcallv(argv[0], id_yield, argc - 1, argv + 1);
if ((remain = NUM2LONG(memo)-1) == 0) {
return Qundef;
}
@@ -1875,7 +1875,7 @@ lazy_take_while_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
{
VALUE result = rb_yield_values2(argc - 1, &argv[1]);
if (!RTEST(result)) return Qundef;
- rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
+ rb_funcallv(argv[0], id_yield, argc - 1, argv + 1);
return Qnil;
}
@@ -1913,7 +1913,7 @@ lazy_drop_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
memo = args;
}
if ((remain = NUM2LONG(memo)) == 0) {
- rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
+ rb_funcallv(argv[0], id_yield, argc - 1, argv + 1);
}
else {
rb_ivar_set(argv[0], id_memo, LONG2NUM(--remain));
@@ -1942,7 +1942,7 @@ lazy_drop_while_func(RB_BLOCK_CALL_FUNC_ARGLIST(val, args))
rb_ivar_set(argv[0], id_memo, memo = Qtrue);
}
if (memo == Qtrue) {
- rb_funcall2(argv[0], id_yield, argc - 1, argv + 1);
+ rb_funcallv(argv[0], id_yield, argc - 1, argv + 1);
}
return Qnil;
}
@@ -1963,7 +1963,7 @@ lazy_uniq_i(VALUE i, VALUE hash, int argc, const VALUE *argv, VALUE yielder)
{
if (rb_hash_add_new_element(hash, i, Qfalse))
return Qnil;
- return rb_funcall2(yielder, id_yield, argc, argv);
+ return rb_funcallv(yielder, id_yield, argc, argv);
}
static VALUE