ruby-changes:2124
From: ko1@a...
Date: 4 Oct 2007 16:28:47 +0900
Subject: [ruby-changes:2124] nobu - Ruby:r13615 (trunk): * parse.y (reg_compile_gen): copy encoding from source string if
nobu 2007-10-04 16:28:35 +0900 (Thu, 04 Oct 2007) New Revision: 13615 Modified files: trunk/ChangeLog trunk/parse.y Log: * parse.y (reg_compile_gen): copy encoding from source string if non-empty. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=13615&r2=13614 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13615&r2=13614 Index: ChangeLog =================================================================== --- ChangeLog (revision 13614) +++ ChangeLog (revision 13615) @@ -1,8 +1,9 @@ -Thu Oct 4 16:15:55 2007 Nobuyoshi Nakada <nobu@r...> +Thu Oct 4 16:28:33 2007 Nobuyoshi Nakada <nobu@r...> * encoding.c (rb_obj_encoding): returns encoding of the given object. - * parse.y (reg_compile_gen): copy encoding from source string. + * parse.y (reg_compile_gen): copy encoding from source string if + non-empty. * re.c (Init_Regexp): new method Regexp#encoding. Index: parse.y =================================================================== --- parse.y (revision 13614) +++ parse.y (revision 13615) @@ -8170,7 +8170,7 @@ compile_error(PARSER_ARG "%s", RSTRING_PTR(re)); return Qnil; } - rb_enc_copy(re, str); + if (str) rb_enc_copy(re, str); return re; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml