Skip to content

[ruby-2.3] Feature #10730: Implement Array#bsearch_index#3532

Merged
kares merged 2 commits intojruby:ruby-2.3from
cheald:array_bsearch_index
Dec 12, 2015
Merged

[ruby-2.3] Feature #10730: Implement Array#bsearch_index#3532
kares merged 2 commits intojruby:ruby-2.3from
cheald:array_bsearch_index

Conversation

@cheald
Copy link
Contributor

@cheald cheald commented Dec 12, 2015

Implements Array#bsearch_index. The binary search is now a private method which returns an int
index, and the public #bsearch and #bsearch_index methods utilize it to return an appropriate
IRubyObject instance.

This is functionally identical to how the MRI changes were implemented.

Implements Array#bsearch_index. The binary search is now a private method which returns an int
index, and the public #bsearch and #bsearch_index methods utilize it to return an appropriate
IRubyObject instance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but I'm curious why the two if(rVal... statements lack a space between the if and (, but the other if statements do not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh, because I wasn't paying attention. Will fix it!

kares added a commit that referenced this pull request Dec 12, 2015
[ruby-2.3] Feature #10730: Implement Array#bsearch_index
@kares kares merged commit ef6d89a into jruby:ruby-2.3 Dec 12, 2015
@kares kares added this to the JRuby 9.1.0.0 milestone Dec 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants