mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (enc_check_encoding): should not load autoloaded encoding
directly, instead use rb_enc_find_index() which deal with alias and replica. [ruby-core:15957] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
149a03bdfb
commit
555eb7ded4
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Mar 19 14:08:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* encoding.c (enc_check_encoding): should not load autoloaded encoding
|
||||||
|
directly, instead use rb_enc_find_index() which deal with alias and
|
||||||
|
replica. [ruby-core:15957]
|
||||||
|
|
||||||
Wed Mar 19 11:49:47 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
Wed Mar 19 11:49:47 2008 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* regint.h (include): include ruby.h instead of defines.h and config.h.
|
* regint.h (include): include ruby.h instead of defines.h and config.h.
|
||||||
|
|
|
@ -108,7 +108,7 @@ enc_check_encoding(VALUE obj)
|
||||||
if (rb_enc_from_index(index) != enc)
|
if (rb_enc_from_index(index) != enc)
|
||||||
return -1;
|
return -1;
|
||||||
if (enc_autoload_p(enc)) {
|
if (enc_autoload_p(enc)) {
|
||||||
index = load_encoding(enc->name);
|
index = rb_enc_find_index(enc->name);
|
||||||
}
|
}
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue