summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-13 07:44:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-13 07:44:52 +0000
commit13622fde3d65cc68f7a5fcf8a03216ccf8aa0cd7 (patch)
tree5b0d3f54c26fa887649d8adec5724132ec3b7d14
parent21a07ed5534ac529afee4f547df1daad4eaf9f33 (diff)
downloadruby-13622fde3d65cc68f7a5fcf8a03216ccf8aa0cd7.tar.gz
ruby-13622fde3d65cc68f7a5fcf8a03216ccf8aa0cd7.tar.xz
ruby-13622fde3d65cc68f7a5fcf8a03216ccf8aa0cd7.zip
* encoding.c (rb_enc_compatible): should not judge compatibility
based on rb_enc_asciicompat(). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--encoding.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 23fffa8a0..b30031790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Dec 13 16:41:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * encoding.c (rb_enc_compatible): should not judge compatibility
+ based on rb_enc_asciicompat().
+
Thu Dec 13 13:09:03 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* include/ruby/io.h (MakeOpenFile): fptr->enc should be
diff --git a/encoding.c b/encoding.c
index 3f7a39b29..94577a1b2 100644
--- a/encoding.c
+++ b/encoding.c
@@ -388,12 +388,6 @@ rb_enc_compatible(VALUE str1, VALUE str2)
if (idx1 == idx2) {
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;