aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c6
1 files changed, 2 insertions, 4 deletions
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);
}