From be230615d016e27d5b45b465d1481f6ecf7f1d28 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 15 Jun 2021 10:06:52 -0700 Subject: 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] --- proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proc.c') 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 -- cgit v1.2.1