Project

General

Profile

Bug #9187

Updated by nobu (Nobuyoshi Nakada) about 10 years ago

Following code causes leakage of st_table: 

 ~~~ruby 
 class Foo 
   def initialize 
     @raise = false 
   end 

   def hash 
     raise if @raise 
     @raise = true 
     return 0 
   end 
 end 

 h = {Foo.new => true} 
 10_0000.times do 
   h.rehash rescue nil 
 end

Back