summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-16 04:08:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-16 04:08:52 +0000
commit16294913f71b8a38526096cf6458340b19b45f9f (patch)
tree7ea6d536085fb2ebeee6556ad66dbd2e7338559f /string.c
parent745737e769cd882c533e39a24254dcbe54e44a37 (diff)
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
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string.c b/string.c
index d810213160..c70af0dab2 100644
--- a/string.c
+++ b/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;