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
merged 3 commits into from Aug 22, 2019

Conversation

@kares
Copy link
Member

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 16, 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
@headius

This comment has been minimized.

Copy link
Member

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.

@kares

This comment has been minimized.

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 9.2.9.0 milestone Aug 22, 2019
@enebo enebo merged commit 69061d1 into jruby:master Aug 22, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jruby.jruby Build #20190417.2 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.