ruby-changes:2298
From: ko1@a...
Date: 29 Oct 2007 17:18:49 +0900
Subject: [ruby-changes:2298] nobu - Ruby:r13789 (trunk): * encoding.c (rb_enc_compatible): ASCII encoding is compatible with
nobu 2007-10-29 17:18:36 +0900 (Mon, 29 Oct 2007)
New Revision: 13789
Modified files:
trunk/ChangeLog
trunk/encoding.c
trunk/version.h
Log:
* encoding.c (rb_enc_compatible): ASCII encoding is compatible with
ASCII-compatible encoding, even for non-string objects.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/version.h?r1=13789&r2=13788
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13789&r2=13788
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=13789&r2=13788
Index: encoding.c
===================================================================
--- encoding.c (revision 13788)
+++ encoding.c (revision 13789)
@@ -360,6 +360,11 @@
return rb_enc_from_index(idx1);
}
+ if (idx1 == 0 && rb_enc_asciicompat(enc = rb_enc_from_index(idx2)))
+ return enc;
+ if (idx2 == 0 && rb_enc_asciicompat(enc = rb_enc_from_index(idx1)))
+ return enc;
+
if (BUILTIN_TYPE(str1) != T_STRING) {
VALUE tmp = str1;
str1 = str2;
Index: ChangeLog
===================================================================
--- ChangeLog (revision 13788)
+++ ChangeLog (revision 13789)
@@ -1,3 +1,8 @@
+Mon Oct 29 17:18:36 2007 Nobuyoshi Nakada <nobu@r...>
+
+ * encoding.c (rb_enc_compatible): ASCII encoding is compatible with
+ ASCII-compatible encoding, even for non-string objects.
+
Sun Oct 28 21:50:02 2007 Tanaka Akira <akr@f...>
* lib/open-uri.rb: :redirect option implemented to disable redirects.
Index: version.h
===================================================================
--- version.h (revision 13788)
+++ version.h (revision 13789)
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
-#define RUBY_RELEASE_DATE "2007-10-26"
+#define RUBY_RELEASE_DATE "2007-10-29"
#define RUBY_VERSION_CODE 190
-#define RUBY_RELEASE_CODE 20071026
+#define RUBY_RELEASE_CODE 20071029
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 10
-#define RUBY_RELEASE_DAY 26
+#define RUBY_RELEASE_DAY 29
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml