summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-30 22:16:26 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-30 22:16:26 +0000
commit870363886f8b5d6ee0700ff8a1b70081515b0fa8 (patch)
treee4685c9fceb5b076d0a09db47cbd708a4913f0ab /string.c
parentd4f1187d31ee300c502713587a26ca186c8e04b9 (diff)
fix type.
* string.c (rb_str_format_m): should pass `int`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/string.c b/string.c
index 48718f93ac..2ff709b0b2 100644
--- a/string.c
+++ b/string.c
@@ -2006,9 +2006,7 @@ rb_str_format_m(VALUE str, VALUE arg)
VALUE tmp = rb_check_array_type(arg);
if (!NIL_P(tmp)) {
- const long len = RARRAY_LENINT(tmp);
- VALUE rv = rb_str_format(len, RARRAY_CONST_PTR(tmp), str);
- return rv;
+ return rb_str_format(RARRAY_LENINT(tmp), RARRAY_CONST_PTR(tmp), str);
}
return rb_str_format(1, &arg, str);
}