kanwei / algorithms

Ruby algorithms and data structures. C extensions
http://kanwei.github.io/algorithms/
MIT License
2.67k stars 352 forks source link

Segfault on rb trees and splaytrees #3

Closed mickey closed 14 years ago

mickey commented 14 years ago

I installed the 0.2 gem (via gem install), copy paste the tree test in my editor (removed first line at the top and put the "require 'rubygems'" at the top),
Just launched it and get a segfault ... everything goes well if I dont populate the sbtree and the rbtree by commenting that lines :

      rbtree { random_array.each_with_index  { |x,index| rbtree[index] = x } }  
      splaytree { random_array.each_with_index  { |x,index| splaytree[index] = x } }  
kanwei commented 14 years ago

Updated gem, thanks!

mickey commented 14 years ago

You rock, it works !! Thanks !