summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/class.c2
-rw-r--r--src/kernel.c2
-rw-r--r--src/string.c2
-rw-r--r--src/vm.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/class.c b/src/class.c
index 2c1145ed3..ebe2bdb4a 100644
--- a/src/class.c
+++ b/src/class.c
@@ -1118,7 +1118,7 @@ mrb_class_new_class(mrb_state *mrb, mrb_value cv)
}
new_class = mrb_obj_value(mrb_class_new(mrb, mrb_class_ptr(super)));
if (!mrb_nil_p(blk)) {
- mrb_funcall_with_block(mrb, new_class, mrb_intern_cstr(mrb, "class_eval"), 0, NULL, blk);
+ mrb_funcall_with_block(mrb, new_class, mrb_intern_lit(mrb, "class_eval"), 0, NULL, blk);
}
mrb_funcall(mrb, super, "inherited", 1, new_class);
return new_class;
diff --git a/src/kernel.c b/src/kernel.c
index 25863c897..e61a602be 100644
--- a/src/kernel.c
+++ b/src/kernel.c
@@ -585,7 +585,7 @@ get_valid_iv_sym(mrb_state *mrb, mrb_value iv_name)
mrb_assert(mrb_symbol_p(iv_name) || mrb_string_p(iv_name));
if (mrb_string_p(iv_name)) {
- iv_name_id = mrb_intern_cstr(mrb, RSTRING_PTR(iv_name));
+ iv_name_id = mrb_intern(mrb, RSTRING_PTR(iv_name), RSTRING_LEN(iv_name));
valid_iv_name(mrb, iv_name_id, RSTRING_PTR(iv_name), RSTRING_LEN(iv_name));
}
else {
diff --git a/src/string.c b/src/string.c
index c880fbe48..6424626d2 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2406,7 +2406,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str)
{
const char *p, *pend;
char buf[CHAR_ESC_LEN + 1];
- mrb_value result = mrb_str_new(mrb, "\"", 1);
+ mrb_value result = mrb_str_new_lit(mrb, "\"");
p = RSTRING_PTR(str); pend = RSTRING_END(str);
for (;p < pend; p++) {
diff --git a/src/vm.c b/src/vm.c
index f11caedd7..5aabd967a 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1342,7 +1342,7 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int
goto L_RAISE;
}
if (mrb->c->prev->ci == mrb->c->prev->cibase) {
- mrb_value exc = mrb_exc_new_str(mrb, E_RUNTIME_ERROR, mrb_str_new(mrb, "double resume", 13));
+ mrb_value exc = mrb_exc_new_str(mrb, E_RUNTIME_ERROR, mrb_str_new_lit(mrb, "double resume"));
mrb->exc = mrb_obj_ptr(exc);
goto L_RAISE;
}