summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/hash.c b/hash.c
index 2a5803c96e..eb6e73908c 100644
--- a/hash.c
+++ b/hash.c
@@ -79,16 +79,16 @@ static int
rb_any_hash(a)
VALUE a;
{
- unsigned int hval;
+ VALUE hval;
switch (TYPE(a)) {
case T_FIXNUM:
case T_SYMBOL:
- hval = a;
+ return (int)a;
break;
case T_STRING:
- hval = rb_str_hash(a);
+ return rb_str_hash(a);
break;
default:
@@ -98,9 +98,8 @@ rb_any_hash(a)
hval = rb_funcall(hval, '%', 1, INT2FIX(65439));
}
ENABLE_INTS;
- hval = FIX2LONG(hval);
+ return (int)FIX2LONG(hval);
}
- return hval;
}
static struct st_hash_type objhash = {