ruby-changes:4434
From: ko1@a...
Date: Tue, 8 Apr 2008 10:53:56 +0900 (JST)
Subject: [ruby-changes:4434] matz - Ruby:r15925 (trunk): * re.c (rb_reg_quote): should always copy the quoting string.
matz 2008-04-08 10:53:35 +0900 (Tue, 08 Apr 2008) New Revision: 15925 Modified files: trunk/ChangeLog trunk/re.c Log: * re.c (rb_reg_quote): should always copy the quoting string. [ruby-core:16235] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15925&r2=15924&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=15925&r2=15924&diff_format=u Index: re.c =================================================================== --- re.c (revision 15924) +++ re.c (revision 15925) @@ -2759,11 +2759,11 @@ } s += clen; } + tmp = rb_str_new3(str); if (ascii_only) { - str = rb_str_new3(str); - rb_enc_associate(str, rb_usascii_encoding()); + rb_enc_associate(tmp, rb_usascii_encoding()); } - return str; + return tmp; meta_found: tmp = rb_str_new(0, RSTRING_LEN(str)*2); Index: ChangeLog =================================================================== --- ChangeLog (revision 15924) +++ ChangeLog (revision 15925) @@ -3,6 +3,9 @@ * load.c (rb_require_safe): should check fname path after $SAFE is properly set. [ruby-dev:34268] + * re.c (rb_reg_quote): should always copy the quoting string. + [ruby-core:16235] + Tue Apr 8 10:30:29 2008 Nobuyoshi Nakada <nobu@r...> * common.mk (prelude.c): depends on enc/prelude.rb. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/