From 074c6e2678bf21a453f0f02ffe49e0239b46377f Mon Sep 17 00:00:00 2001 From: takahashim Date: Sun, 27 Sep 2015 13:43:43 +0900 Subject: fix String#inspect with MRB_UTF8_STRING cf. #2963 --- src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/string.c b/src/string.c index 94afb4787..6cad6a4ac 100644 --- a/src/string.c +++ b/src/string.c @@ -2586,7 +2586,7 @@ mrb_str_inspect(mrb_state *mrb, mrb_value str) buf[i] = p[i]; } mrb_str_cat(mrb, result, buf, clen); - p += clen; + p += clen-1; continue; } #endif -- cgit v1.2.3