summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-19 05:08:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-19 05:08:49 +0000
commit555eb7ded4e1fb54c434dcdd3c8348881a2a6765 (patch)
treeb4500c43738f5bfea5ea25637faaa0ffb086c99f
parent149a03bdfbaffe39a454a695c5b4c531951193c7 (diff)
* 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
-rw-r--r--ChangeLog6
-rw-r--r--encoding.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b82cbef1f..ee70c2f071 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* regint.h (include): include ruby.h instead of defines.h and config.h.
diff --git a/encoding.c b/encoding.c
index c7881a8eda..9759da79a4 100644
--- a/encoding.c
+++ b/encoding.c
@@ -108,7 +108,7 @@ enc_check_encoding(VALUE obj)
if (rb_enc_from_index(index) != enc)
return -1;
if (enc_autoload_p(enc)) {
- index = load_encoding(enc->name);
+ index = rb_enc_find_index(enc->name);
}
return index;
}