1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2018-06-11 23:33:35 +00:00
parent de5e6ca2b4
commit 0534566839

6
ruby.c
View file

@ -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);
}