mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* encoding.c (rb_enc_find_index): extension libraries have lower case
names conventionally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ef0706a5bf
commit
e15390d08d
2 changed files with 5 additions and 1 deletions
|
@ -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_register): set encoding constant.
|
||||||
|
|
||||||
* encoding.c (rb_enc_find_index): replace non-alphanumeric chars with
|
* encoding.c (rb_enc_find_index): replace non-alphanumeric chars with
|
||||||
underscores, so that initialize function can be called.
|
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
|
* ruby.c (proc_options, process_options): finds encoding after
|
||||||
load_path is initialized.
|
load_path is initialized.
|
||||||
|
|
||||||
|
|
|
@ -302,6 +302,7 @@ rb_enc_find_index(const char *name)
|
||||||
char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib);
|
char *s = RSTRING_PTR(enclib) + 4, *e = RSTRING_END(enclib);
|
||||||
while (s < e) {
|
while (s < e) {
|
||||||
if (!ISALNUM(*s)) *s = '_';
|
if (!ISALNUM(*s)) *s = '_';
|
||||||
|
else if (ISUPPER(*s)) *s = tolower(*s);
|
||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
OBJ_FREEZE(enclib);
|
OBJ_FREEZE(enclib);
|
||||||
|
|
Loading…
Reference in a new issue