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

Correct last index position #71

Merged

Conversation

tiendo1011
Copy link
Collaborator

@tiendo1011 tiendo1011 commented Dec 14, 2021

Inside replace_next_larger method, the last_index is calculated as follow: last_index ||= enum.size.
However, semantically, that is the last index in the array plus 1, so I think it should be last_index ||= enum.size - 1


This change is Reviewable

Copy link
Owner

@halostatue halostatue left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @tiendo1011)

@halostatue
Copy link
Owner

This change looks good. Can you rebase against current master so we can get a clean bill of health from CI?

@tiendo1011
Copy link
Collaborator Author

tiendo1011 commented Dec 15, 2021

@halostatue sure, some checks in master are failing so I'll rebase after they pass, is it ok?

@halostatue
Copy link
Owner

There are some "expected" failures with jruby-head. They should all pass otherwise.

@tiendo1011
Copy link
Collaborator Author

@halostatue I see, I've rebased against master

@halostatue halostatue merged commit dc36fa3 into halostatue:master Dec 16, 2021
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

Successfully merging this pull request may close these issues.

2 participants