From 1cf97f54981f1bef0371ee15d6972f98ee3ff994 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 4 Oct 2016 16:25:01 +0000 Subject: * internal.h (ST2FIX): new macro to convert st_index_t to Fixnum. a hash value of Object might be Bignum, but it causes many troubles expecially the Object is used as a key of a hash. so I've gave up to do so. * array.c (rb_ary_hash): use above macro. * bignum.c (rb_big_hash): ditto. * hash.c (rb_obj_hash, rb_hash_hash): ditto. * numeric.c (rb_dbl_hash): ditto. * proc.c (proc_hash): ditto. * re.c (rb_reg_hash, match_hash): ditto. * string.c (rb_str_hash_m): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index e39fd0528d..126932e8f0 100644 --- a/proc.c +++ b/proc.c @@ -1196,7 +1196,7 @@ proc_hash(VALUE self) hash = rb_hash_start(0); hash = rb_hash_proc(hash, self); hash = rb_hash_end(hash); - return LONG2FIX(hash); + return ST2FIX(hash); } /* -- cgit v1.2.3