summaryrefslogtreecommitdiffhomepage
path: root/src/string.c
diff options
context:
space:
mode:
authorcubicdaiya <[email protected]>2014-02-26 02:23:50 +0900
committercubicdaiya <[email protected]>2014-02-26 02:23:50 +0900
commit94c5a5ee73eed59dbb5c8d8576cf663f776453c5 (patch)
tree011f9d5221d696ffc98eb36298d28bc3478a9bd2 /src/string.c
parentf3e9a066aa267b3b2ed5b95cb6fbc86d68bd9187 (diff)
downloadmruby-94c5a5ee73eed59dbb5c8d8576cf663f776453c5.tar.gz
mruby-94c5a5ee73eed59dbb5c8d8576cf663f776453c5.zip
use mrb_str_new_lit instead of mrb_str_new for C string literals
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c2
1 files changed, 1 insertions, 1 deletions
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++) {