summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 04:47:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 04:47:00 +0000
commitfd11fad05fc7fe031151b515d29b4642c0c26b34 (patch)
tree3d9b4bbe31f3496fd662a3637e52cf6092bbfa31
parent75ee92129f2e5845e0c3c852155bc451970a4db7 (diff)
downloadruby-fd11fad05fc7fe031151b515d29b4642c0c26b34.tar.gz
ruby-fd11fad05fc7fe031151b515d29b4642c0c26b34.tar.xz
ruby-fd11fad05fc7fe031151b515d29b4642c0c26b34.zip
* encoding.c (rb_enc_find_index): extension libraries have lower case
names conventionally. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--encoding.c1
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 85d667d06..c9bc8f647 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,13 @@
-Fri Dec 21 13:40:11 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Fri Dec 21 13:46:58 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* encoding.c (rb_enc_register): set encoding constant.
* encoding.c (rb_enc_find_index): replace non-alphanumeric chars with
underscores, so that initialize function can be called.
+ * encoding.c (rb_enc_find_index): extension libraries have lower case
+ names conventionally.
+
* ruby.c (proc_options, process_options): finds encoding after
load_path is initialized.
diff --git a/encoding.c b/encoding.c
index fdcceab5a..ba83837f4 100644
--- a/encoding.c
+++ b/encoding.c
@@ -302,6 +302,7 @@ rb_enc_find_index(const char *name)
char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib);
while (s < e) {
if (!ISALNUM(*s)) *s = '_';
+ else if (ISUPPER(*s)) *s = tolower(*s);
++s;
}
OBJ_FREEZE(enclib);