We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following the readme:
$ gem install binary_search Fetching: binary_search-0.3.0.gem (100%) Building native extensions. This could take a while... Successfully installed binary_search-0.3.0 1 gem installed $ irb 1.9.3-p327 :001 > require 'binary_search/native' => true 1.9.3-p327 :002 > x = [5,1,6,7,2,6,4,2,6,1,6,1,1,8,3,5,2].sort => [1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8] 1.9.3-p327 :004 > target = 4 => 4 1.9.3-p327 :005 > y = [[1,:a], [2,:b], [3,:c], [4,:d]] => [[1, :a], [2, :b], [3, :c], [4, :d]] 1.9.3-p327 :006 > puts x.binary_search { |v| target <=> v[0] } NoMethodError: undefined method `binary_search' for [1, 1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 6, 6, 6, 6, 7, 8]:Array from (irb):6 from /home/gabe2/.rvm/rubies/ruby-1.9.3-p327/bin/irb:13:in `<main>'
The text was updated successfully, but these errors were encountered:
Same problem here. Using Mac OS.
Sorry, something went wrong.
It works for me... Also using OS X.
It seems the native version does not define this method.
No branches or pull requests
Following the readme:
The text was updated successfully, but these errors were encountered: