diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-29 08:18:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-29 08:18:36 +0000 |
commit | 3dacfd3fe43e67eefc5f7eed63cd02d1c1b92612 (patch) | |
tree | ca0ebf9f353ed9963ce5c92495879ddfebb5b93c | |
parent | 2e064c694ce2e24030188da5f89ad66a59118350 (diff) | |
download | ruby-3dacfd3fe43e67eefc5f7eed63cd02d1c1b92612.tar.gz |
* encoding.c (rb_enc_compatible): ASCII encoding is compatible with
ASCII-compatible encoding, even for non-string objects.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | encoding.c | 5 | ||||
-rw-r--r-- | version.h | 6 |
3 files changed, 13 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Mon Oct 29 17:18:36 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * 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@fsij.org> * lib/open-uri.rb: :redirect option implemented to disable redirects. diff --git a/encoding.c b/encoding.c index 2c2563ab02..52cce8c66f 100644 --- a/encoding.c +++ b/encoding.c @@ -360,6 +360,11 @@ rb_enc_compatible(VALUE str1, VALUE str2) 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; @@ -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[]; |