aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 5eebc285af..fa323a1f4e 100644
--- a/hash.c
+++ b/hash.c
@@ -169,6 +169,10 @@ any_hash(VALUE a, st_index_t (*other_func)(VALUE))
else if (BUILTIN_TYPE(a) == T_SYMBOL) {
hnum = RSYMBOL(a)->hashval;
}
+ else if (BUILTIN_TYPE(a) == T_BIGNUM) {
+ hval = rb_big_hash(a);
+ hnum = FIX2LONG(hval);
+ }
else if (BUILTIN_TYPE(a) == T_FLOAT) {
flt:
hval = rb_dbl_hash(rb_float_value(a));