From 053456683901317bfd3207c93e0691a32d2948d9 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 11 Jun 2018 23:33:35 +0000 Subject: ruby.c: making hidden objects * ruby.c (add_modules): make hidden objects by particular functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index 2cdf1a0f26..4cf80c4ef1 100644 --- a/ruby.c +++ b/ruby.c @@ -655,11 +655,9 @@ add_modules(VALUE *req_list, const char *mod) VALUE feature; if (!list) { - *req_list = list = rb_ary_new(); - RBASIC_CLEAR_CLASS(list); + *req_list = list = rb_ary_tmp_new(0); } - feature = rb_str_new2(mod); - RBASIC_CLEAR_CLASS(feature); + feature = rb_str_cat_cstr(rb_str_tmp_new(0), mod); rb_ary_push(list, feature); } -- cgit v1.2.3