summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--object.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 500e0e9b11..daa5c82713 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sun Mar 21 09:22:10 2010 Tanaka Akira <akr@fsij.org>
+
+ * object.c (rb_obj_hash): use LONG2FIX to avoid Bignum allocation.
+
Sat Mar 20 22:51:46 2010 Tanaka Akira <akr@fsij.org>
* string.c (rb_str_sum): use UCHAR_MAX.
diff --git a/object.c b/object.c
index 0421824202..f473fe1e4f 100644
--- a/object.c
+++ b/object.c
@@ -101,7 +101,7 @@ rb_obj_hash(VALUE obj)
{
VALUE oid = rb_obj_id(obj);
st_index_t h = rb_hash_end(rb_hash_start(NUM2LONG(oid)));
- return LONG2NUM(h);
+ return LONG2FIX(h);
}
/*