diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | encoding.c | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Thu Dec 11 20:05:17 2008 <nobu@ruby-lang.org> + + * encoding.c (rb_enc_aliases_enc_i): skips default internal. + Thu Dec 11 19:31:45 2008 Tanaka Akira <akr@fsij.org> * lib/test/unit/assertions.rb: extracted from lib/test/unit.rb. diff --git a/encoding.c b/encoding.c index 3253bfdd24..8a2f9dbfb9 100644 --- a/encoding.c +++ b/encoding.c @@ -1297,6 +1297,7 @@ rb_enc_aliases_enc_i(st_data_t name, st_data_t orig, st_data_t arg) if (NIL_P(str)) { rb_encoding *enc = rb_enc_from_index(idx); + if (!enc) return ST_CONTINUE; if (STRCASECMP((char*)name, rb_enc_name(enc)) == 0) { return ST_CONTINUE; } |