summaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-16 21:18:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-10-16 21:18:09 +0000
commit1ed88df67f94e52007176cb8a5cb85a66658d69b (patch)
tree17000a6dc4a3f3da9ef98fda3e573812dd0246b6 /st.c
parentd1d1ea562c786bbf81489c0b792184a59176fd60 (diff)
downloadruby-1ed88df67f94e52007176cb8a5cb85a66658d69b.tar.gz
ruby-1ed88df67f94e52007176cb8a5cb85a66658d69b.tar.xz
ruby-1ed88df67f94e52007176cb8a5cb85a66658d69b.zip
* encoding.c (rb_enc_alias, rb_enc_find_index): changed
enc_table_alias to a name-to-index hash. * encoding.c (rb_enc_init): use upper case names for aliases to use as constant names. * encoding.c (enc_find): allow symbols. * encoding.c (Init_Encoding): define encoding constants. * st.c (strcasehash): fix wrong code range condition. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'st.c')
-rw-r--r--st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/st.c b/st.c
index 2418547eb..5efd57e43 100644
--- a/st.c
+++ b/st.c
@@ -842,7 +842,7 @@ strcasehash(register const char *string)
*/
while (*string) {
unsigned int c = (unsigned char)*string++;
- if ((unsigned int)(c - 'A') > ('Z' - 'A')) c += 'a' - 'A';
+ if ((unsigned int)(c - 'A') <= ('Z' - 'A')) c += 'a' - 'A';
hval ^= c;
/* multiply by the 32 bit FNV magic prime mod 2^32 */