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

[ji] align Java array (with post 1.8 conventions) #5700

merged 3 commits into from Aug 22, 2019


Copy link

@kares kares commented Apr 17, 2019

  • j_ary = [ 1 ].to_java; j_ary[2] shall raise IndexError (instead of ArgumentError)
  • handle edge cases e.g. [ "a", "b", "c" ].to_java[-10..2] similar to a Ruby Array (nil)

the first one might be considered a bug as well as a breaking change -> maybe target 9.3?

kares added 3 commits Apr 17, 2019
a relict from 1.8 times -> Ruby 2.X uses IndexError on Array
wasn't spec-ed and has been erroring when index started before 0
Copy link

headius commented Aug 19, 2019

This change seems ok to me even for a shorter-term merge. Someone might rely on it raising an error, but I think it would have to be a pretty weird case.

Copy link
Member Author

kares commented Aug 19, 2019

okay, its fine by me wherever it ends up.
@enebo any objections to have it next 9.2?

@enebo enebo added this to the JRuby milestone Aug 22, 2019
@enebo enebo merged commit 69061d1 into jruby:master Aug 22, 2019
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants