Skip to content

Commit 1baf58c

Browse files
Prefer rb_ary_tmp_new to rb_ary_new2 to hide tmp array
1 parent f1565b9 commit 1baf58c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/js/js-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ static VALUE _rb_js_obj_call(int argc, VALUE *argv, VALUE obj) {
257257
abi_args.ptr =
258258
ALLOCA_N(rb_js_abi_host_js_abi_value_t, function_arguments_count);
259259
abi_args.len = function_arguments_count;
260-
VALUE rv_args = rb_ary_new2(function_arguments_count);
260+
VALUE rv_args = rb_ary_tmp_new(function_arguments_count);
261261

262262
for (int i = 1; i < argc; i++) {
263263
VALUE arg = _rb_js_try_convert(rb_mJS, argv[i]);

0 commit comments

Comments
 (0)