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

ruby-changes:16215

From: naruse <ko1@a...>
Date: Sun, 6 Jun 2010 02:57:15 +0900 (JST)
Subject: [ruby-changes:16215] Ruby:r28181 (ruby_1_9_2): merge revision(s) 28103:

naruse	2010-06-06 02:56:55 +0900 (Sun, 06 Jun 2010)

  New Revision: 28181

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

  Log:
    merge revision(s) 28103:
    
    * encoding.c (rb_enc_unicode_p): check the encoding is Unicode
      or not by the name; not function's pointer. [ruby-dev:41479]

  Modified files:
    branches/ruby_1_9_2/ChangeLog
    branches/ruby_1_9_2/encoding.c
    branches/ruby_1_9_2/version.h

Index: ruby_1_9_2/encoding.c
===================================================================
--- ruby_1_9_2/encoding.c	(revision 28180)
+++ ruby_1_9_2/encoding.c	(revision 28181)
@@ -420,7 +420,8 @@
 int
 rb_enc_unicode_p(rb_encoding *enc)
 {
-    return rb_utf8_encoding()->is_code_ctype == enc->is_code_ctype;
+    const char *name = rb_enc_name(enc);
+    return name[0] == 'U' && name[1] == 'T' && name[2] == 'F' && name[4] != '7';
 }
 
 static const char *
Index: ruby_1_9_2/ChangeLog
===================================================================
--- ruby_1_9_2/ChangeLog	(revision 28180)
+++ ruby_1_9_2/ChangeLog	(revision 28181)
@@ -1,3 +1,8 @@
+Sun Jun  6 02:56:42 2010  NARUSE, Yui  <naruse@r...>
+
+	* encoding.c (rb_enc_unicode_p): check the encoding is Unicode
+	  or not by the name; not function's pointer. [ruby-dev:41479]
+
 Sat Jun  5 23:15:42 2010  NARUSE, Yui  <naruse@r...>
 
 	* re.c (rb_reg_expr_str): ASCII incompatible strings
Index: ruby_1_9_2/version.h
===================================================================
--- ruby_1_9_2/version.h	(revision 28180)
+++ ruby_1_9_2/version.h	(revision 28181)
@@ -1,5 +1,5 @@
 #define RUBY_VERSION "1.9.2"
-#define RUBY_RELEASE_DATE "2010-06-05"
+#define RUBY_RELEASE_DATE "2010-06-06"
 #define RUBY_PATCHLEVEL -1
 
 #define RUBY_VERSION_MAJOR 1
@@ -7,7 +7,7 @@
 #define RUBY_VERSION_TEENY 1
 #define RUBY_RELEASE_YEAR 2010
 #define RUBY_RELEASE_MONTH 6
-#define RUBY_RELEASE_DAY 5
+#define RUBY_RELEASE_DAY 6
 
 #include "ruby/version.h"
 

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

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