Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash_ring.rb returns index -1 #9

Closed
aw opened this issue Nov 14, 2009 · 1 comment
Closed

hash_ring.rb returns index -1 #9

aw opened this issue Nov 14, 2009 · 1 comment

Comments

@aw
Copy link

aw commented Nov 14, 2009

Hi,

I noticed the binary_search function sometimes returns -1. This occurs when 'value' is lower than ary[0].

I modified and added this:

end
if upper < 0
upper = ary.size - 1
end
return upper
end

@ezmobius
Copy link

fixed in the ruby and C versions of binary_search. thanks

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants