summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-06-15 10:06:52 -0700
committerJeremy Evans <code@jeremyevans.net>2021-06-24 12:25:33 -0700
commitbe230615d016e27d5b45b465d1481f6ecf7f1d28 (patch)
tree96ce3b8d68dcefe8372bc4d95561875dbfd94b98 /proc.c
parent3ab68b910fc2c7bad0432892bddd9874e77ad35e (diff)
downloadruby-be230615d016e27d5b45b465d1481f6ecf7f1d28.tar.gz
Remove shift of ep when computing Proc#hash
The shift was causing far fewer unique values of hash than expected. Fix pointed out by xtkoba (Tee KOBAYASHI) Fixes [Bug #17951]
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proc.c b/proc.c
index f9e04ce4a1..6e1572847b 100644
--- a/proc.c
+++ b/proc.c
@@ -1451,7 +1451,7 @@ rb_hash_proc(st_index_t hash, VALUE prc)
GetProcPtr(prc, proc);
hash = rb_hash_uint(hash, (st_index_t)proc->block.as.captured.code.val);
hash = rb_hash_uint(hash, (st_index_t)proc->block.as.captured.self);
- return rb_hash_uint(hash, (st_index_t)proc->block.as.captured.ep >> 16);
+ return rb_hash_uint(hash, (st_index_t)proc->block.as.captured.ep);
}
MJIT_FUNC_EXPORTED VALUE