GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
I just got a report of this: eric/metriks#13
It looks like the problem is that if you try to delete a key that wasn't found, it still tries to call #value on the result.
I actually got further on it. The problem is when the key is of a different type:
It looks like the problem is <=> returns nil if the types don't match, and there is no case for that.
Ah, thanks for the investigation. We removed 'key.to_s' so <=> could return nil now.
I'm going to change trees to raise TypeError when <=> returns nil for both #insert and #delete.
Do you think it's OK for you?
Yeah, I think that makes sense. At least I'll be able to figure out
where my bug is.