aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compile.c4
-rw-r--r--load.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 811160ad11..68aeb4cfce 100644
--- a/compile.c
+++ b/compile.c
@@ -5971,7 +5971,7 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int poppe
}
case NODE_SCLASS:{
ID singletonclass;
- const rb_iseq_t *singleton_class = NEW_ISEQ(node->nd_body, rb_str_new2("singleton class"),
+ const rb_iseq_t *singleton_class = NEW_ISEQ(node->nd_body, rb_fstring_cstr("singleton class"),
ISEQ_TYPE_CLASS, line);
CHECK(COMPILE(ret, "sclass#recv", node->nd_recv));
@@ -6515,7 +6515,7 @@ rb_insns_name_array(void)
VALUE ary = rb_ary_new();
int i;
for (i = 0; i < numberof(insn_name_info); i++) {
- rb_ary_push(ary, rb_fstring(rb_str_new2(insn_name_info[i])));
+ rb_ary_push(ary, rb_fstring_cstr(insn_name_info[i]));
}
return rb_obj_freeze(ary);
}
diff --git a/load.c b/load.c
index 854d56a9d9..284ebf2e48 100644
--- a/load.c
+++ b/load.c
@@ -612,7 +612,8 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
VALUE parser = rb_parser_new();
rb_parser_set_context(parser, NULL, FALSE);
node = (NODE *)rb_parser_load_file(parser, fname);
- iseq = rb_iseq_new_top(node, rb_str_new2("<top (required)>"), fname, rb_realpath_internal(Qnil, fname, 1), NULL);
+ iseq = rb_iseq_new_top(node, rb_fstring_cstr("<top (required)>"),
+ fname, rb_realpath_internal(Qnil, fname, 1), NULL);
}
rb_iseq_eval(iseq);
}