summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/string.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/string.c b/src/string.c
index 28b9d08ea..33a32e842 100644
--- a/src/string.c
+++ b/src/string.c
@@ -277,10 +277,7 @@ str_buf_cat(mrb_state *mrb, struct RString *s, const char *ptr, size_t len)
mrb_value
mrb_str_new(mrb_state *mrb, const char *p, size_t len)
{
- struct RString *s;
-
- s = str_new(mrb, p, len);
- return mrb_obj_value(s);
+ return mrb_obj_value(str_new(mrb, p, len));
}
/*