Skip to content
  • nagachika's avatar
    f404b21f
    merge revision(s) 496591de: [Backport #18578] · f404b21f
    nagachika authored
    	st.c: Do not clear entries_bound when calling Hash#shift for empty
    	 hash
    
    	tab->entries_bound is used to check if the bins are full in
    	rebuild_table_if_necessary.
    
    	Hash#shift against an empty hash assigned 0 to tab->entries_bound, but
    	didn't clear the bins. Thus, the table is not rebuilt even when the bins
    	are full. Attempting to add a new element into full-bin hash gets stuck.
    
    	This change stops clearing tab->entries_bound in Hash#shift.
    	[Bug #18578]
    	---
    	 st.c                   |  1 -
    	 test/ruby/test_hash.rb | 13 +++++++++++++
    	 2 files changed, 13 insertions(+), 1 deletion(-)
    f404b21f
    merge revision(s) 496591de: [Backport #18578]
    nagachika authored
    	st.c: Do not clear entries_bound when calling Hash#shift for empty
    	 hash
    
    	tab->entries_bound is used to check if the bins are full in
    	rebuild_table_if_necessary.
    
    	Hash#shift against an empty hash assigned 0 to tab->entries_bound, but
    	didn't clear the bins. Thus, the table is not rebuilt even when the bins
    	are full. Attempting to add a new element into full-bin hash gets stuck.
    
    	This change stops clearing tab->entries_bound in Hash#shift.
    	[Bug #18578]
    	---
    	 st.c                   |  1 -
    	 test/ruby/test_hash.rb | 13 +++++++++++++
    	 2 files changed, 13 insertions(+), 1 deletion(-)
Loading