ruby-changes:33540
From: nobu <ko1@a...>
Date: Fri, 18 Apr 2014 16:55:21 +0900 (JST)
Subject: [ruby-changes:33540] nobu:r45621 (trunk): string.c: keep code range
nobu 2014-04-18 16:55:04 +0900 (Fri, 18 Apr 2014) New Revision: 45621 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45621 Log: string.c: keep code range * string.c (str_buf_cat): keep code range if possible. Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 45620) +++ string.c (revision 45621) @@ -2021,7 +2021,7 @@ str_buf_cat(VALUE str, const char *ptr, https://github.com/ruby/ruby/blob/trunk/string.c#L2021 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/