ruby-changes:1802
From: ko1@a...
Date: 28 Aug 2007 14:23:41 +0900
Subject: [ruby-changes:1802] nobu - Ruby:r13293 (trunk): * string.c (rb_str_splice_0): should check to modify.
nobu 2007-08-28 14:23:33 +0900 (Tue, 28 Aug 2007) New Revision: 13293 Modified files: trunk/ChangeLog trunk/string.c Log: * string.c (rb_str_splice_0): should check to modify. [ruby-dev:31665] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/string.c?r1=13293&r2=13292 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13293&r2=13292 Index: ChangeLog =================================================================== --- ChangeLog (revision 13292) +++ ChangeLog (revision 13293) @@ -1,3 +1,7 @@ +Tue Aug 28 14:23:31 2007 Nobuyoshi Nakada <nobu@r...> + + * string.c (rb_str_splice_0): should check to modify. [ruby-dev:31665] + Tue Aug 28 14:21:46 2007 Nobuyoshi Nakada <nobu@r...> * parse.y (parser_prepare): set parser encode too when BOM exists. Index: string.c =================================================================== --- string.c (revision 13292) +++ string.c (revision 13293) @@ -1834,6 +1834,7 @@ static void rb_str_splice_0(VALUE str, long beg, long len, VALUE val) { + rb_str_modify(str); if (len < RSTRING_LEN(val)) { /* expand string */ RESIZE_CAPA(str, RSTRING_LEN(str) + RSTRING_LEN(val) - len + 1); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml