You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes! I forgot I added key.to_s there. The code is derived from https://github.com/nahi/radix_tree/blob/master/lib/radix_tree.rb which only supports String key. Comparable is enough for key in AVLTree and RedBlackTree... It's simply a bug. Thanks for finding it.
I'll wait a pull request to record the credit to you.
I am looking for a key-value data structure where the keys (floats) are naturally sorted for my metriks gem.
I am currently using RBTree but would like to use something without native code (to allow it to be used in JRuby, etc).
The class I am using it in is here: https://github.com/eric/metriks/blob/master/lib/metriks/exponentially_decaying_sample.rb
Would you take a pull request that removed the instances of calling
.to_s
on the keys?The text was updated successfully, but these errors were encountered: