[前][次][番号順一覧][スレッド一覧]

ruby-changes:8702

From: nobu <ko1@a...>
Date: Sat, 15 Nov 2008 22:47:07 +0900 (JST)
Subject: [ruby-changes:8702] Ruby:r20237 (trunk): * re.c (rb_reg_regsub): returns -1 unless ascii as well as

nobu	2008-11-15 22:46:52 +0900 (Sat, 15 Nov 2008)

  New Revision: 20237

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20237

  Log:
    * re.c (rb_reg_regsub): returns -1 unless ascii as well as
      rb_enc_ascget().  [ruby-dev:37097]

  Modified files:
    trunk/ChangeLog
    trunk/re.c

Index: re.c
===================================================================
--- re.c	(revision 20236)
+++ re.c	(revision 20237)
@@ -3141,7 +3141,7 @@
     rb_encoding *str_enc = rb_enc_get(str);
     rb_encoding *src_enc = rb_enc_get(src);
     int acompat = rb_enc_asciicompat(str_enc);
-#define ASCGET(s,e,cl) (acompat ? (*cl=1,s[0]) : rb_enc_ascget(s, e, cl, str_enc))
+#define ASCGET(s,e,cl) (acompat ? (*cl=1,ISASCII(s[0])?s[0]:-1) : rb_enc_ascget(s, e, cl, str_enc))
 
     p = s = RSTRING_PTR(str);
     e = s + RSTRING_LEN(str);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20236)
+++ ChangeLog	(revision 20237)
@@ -1,3 +1,8 @@
+Sat Nov 15 22:46:32 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* re.c (rb_reg_regsub): returns -1 unless ascii as well as
+	  rb_enc_ascget().  [ruby-dev:37097]
+
 Sat Nov 15 22:23:45 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (LDSHARED): do not suppress debug info if higher debug

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]