hamstergem/hamster — pull request #159 by dubek (2014-11-05 18:01:47+00:00)
Title: SortedSet#find_index: fix wrong returned indexes when using the non-block variant

`SortedSet#find_index(obj)` returns wrong indexes. This variant of the method was not covered at all by the spec.

Before the fix:

```
[1] pry(main)> s = Hamster::SortedSet[*(0..10)]
=> Hamster::SortedSet[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[2] pry(main)> s.each { |e| p [e, s.find_index(e)] }
[0, 2]
[1, 2]
[2, 3]
[3, 3]
[4, 3]
[5, 5]
[6, 6]
[7, 6]
[8, 7]
[9, 7]
[10, 7]
```

After the fix:

```
[1] pry(main)> s = Hamster::SortedSet[*(0..10)]
=> Hamster::SortedSet[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[2] pry(main)> s.each { |e| p [e, s.find_index(e)] }
[0, 0]
[1, 1]
[2, 2]
[3, 3]
[4, 4]
[5, 5]
[6, 6]
[7, 7]
[8, 8]
[9, 9]
[10, 10]
```