From 0ee6aff847ecccdcfda911b54ad149a1f2543ad2 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 18 Apr 2014 07:55:04 +0000 Subject: string.c: keep code range * string.c (str_buf_cat): keep code range if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'string.c') diff --git a/string.c b/string.c index 6294ea8d1a..515a340adc 100644 --- a/string.c +++ b/string.c @@ -2021,7 +2021,7 @@ str_buf_cat(VALUE str, const char *ptr, long len) if (ptr >= RSTRING_PTR(str) && ptr <= RSTRING_END(str)) { off = ptr - RSTRING_PTR(str); } - rb_str_modify(str); + str_modify_keep_cr(str); if (len == 0) return 0; if (STR_EMBED_P(str)) { capa = RSTRING_EMBED_LEN_MAX; -- cgit v1.2.3