ruby-changes:2951
From: ko1@a...
Date: 22 Dec 2007 03:21:54 +0900
Subject: [ruby-changes:2951] matz - Ruby:r14442 (trunk): * re.c (rb_reg_prepare_re): stop ENCODING_NONE warning if the
matz 2007-12-22 03:21:41 +0900 (Sat, 22 Dec 2007) New Revision: 14442 Modified files: trunk/ChangeLog trunk/re.c Log: * re.c (rb_reg_prepare_re): stop ENCODING_NONE warning if the encoding of the str is ASCII-8BIT. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14442&r2=14441 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=14442&r2=14441 Index: re.c =================================================================== --- re.c (revision 14441) +++ re.c (revision 14442) @@ -954,9 +954,10 @@ need_recompile = 1; } if ((RBASIC(re)->flags & REG_ENCODING_NONE) && + enc != rb_default_encoding() && rb_enc_str_coderange(str) != ENC_CODERANGE_7BIT) { rb_warn("none encoding regexp with non ASCII string (string encoding: %s)", - rb_enc_name(rb_enc_get(str))); + rb_enc_name(enc)); } } Index: ChangeLog =================================================================== --- ChangeLog (revision 14441) +++ ChangeLog (revision 14442) @@ -3,6 +3,9 @@ * parse.y (command): block from cmd_brace_block was ignored. [ruby-dev:32644] + * re.c (rb_reg_prepare_re): stop ENCODING_NONE warning if the + encoding of the str is ASCII-8BIT. + Sat Dec 22 01:52:11 2007 Yukihiro Matsumoto <matz@r...> * io.c (io_ungetc): avoid buffer relocation, which might cause -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml