mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (rb_enc_compatible): should swap encoding indexes too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
02501dbe91
commit
af69c73087
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Dec 13 17:03:29 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* encoding.c (rb_enc_compatible): should swap encoding indexes too.
|
||||
|
||||
Thu Dec 13 16:41:37 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* encoding.c (rb_enc_compatible): should not judge compatibility
|
||||
|
|
|
@ -390,8 +390,11 @@ rb_enc_compatible(VALUE str1, VALUE str2)
|
|||
}
|
||||
if (BUILTIN_TYPE(str1) != T_STRING) {
|
||||
VALUE tmp = str1;
|
||||
int idx0 = idx1;
|
||||
str1 = str2;
|
||||
str2 = tmp;
|
||||
idx1 = idx2;
|
||||
idx2 = idx0;
|
||||
}
|
||||
if (BUILTIN_TYPE(str1) == T_STRING) {
|
||||
int cr1, cr2;
|
||||
|
|
Loading…
Reference in a new issue