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:
parent
de5e6ca2b4
commit
0534566839
1 changed files with 2 additions and 4 deletions
6
ruby.c
6
ruby.c
|
@ -655,11 +655,9 @@ add_modules(VALUE *req_list, const char *mod)
|
||||||
VALUE feature;
|
VALUE feature;
|
||||||
|
|
||||||
if (!list) {
|
if (!list) {
|
||||||
*req_list = list = rb_ary_new();
|
*req_list = list = rb_ary_tmp_new(0);
|
||||||
RBASIC_CLEAR_CLASS(list);
|
|
||||||
}
|
}
|
||||||
feature = rb_str_new2(mod);
|
feature = rb_str_cat_cstr(rb_str_tmp_new(0), mod);
|
||||||
RBASIC_CLEAR_CLASS(feature);
|
|
||||||
rb_ary_push(list, feature);
|
rb_ary_push(list, feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue