--- MacRuby/trunk/hash.c 2008-09-07 23:42:14 UTC (rev 569)
+++ MacRuby/trunk/hash.c 2008-09-07 23:42:34 UTC (rev 570)
@@ -37,7 +37,13 @@
VALUE
rb_hash(VALUE obj)
{
- return rb_funcall(obj, id_hash, 0);
+ VALUE v = rb_funcall(obj, id_hash, 0);
+ if (TYPE(v) == T_BIGNUM) {
+ unsigned long l = NUM2ULONG(v);
+ l /= 2.0;
+ v = ULONG2NUM(l);
+ }
+ return v;
}
typedef int st_foreach_func(st_data_t, st_data_t, st_data_t);