Skip to content

Always check array insert pos#8904

Merged
headius merged 2 commits intojruby:jruby-9.4from
headius:always_check_array_insert_pos
Jul 9, 2025
Merged

Always check array insert pos#8904
headius merged 2 commits intojruby:jruby-9.4from
headius:always_check_array_insert_pos

Conversation

@headius
Copy link
Member

@headius headius commented Jul 9, 2025

This PR addresses #8902 in two ways:

  • Always try to coerce the position argument in the varargs path of Array#insert, matching behavior changed for https://bugs.ruby-lang.org/issues/13558.
  • Also route specific-arity calls one the variable-arity path to their specific-arity forms. This largely eliminates the need for the first change above, but is more consistent with other places we have both specific and variable-arity method bindings.

@headius headius added this to the JRuby 9.4.14.0 milestone Jul 9, 2025
@headius headius linked an issue Jul 9, 2025 that may be closed by this pull request
@headius headius merged commit d436a0e into jruby:jruby-9.4 Jul 9, 2025
95 of 96 checks passed
@headius headius deleted the always_check_array_insert_pos branch July 9, 2025 19:05
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.

Sporadic failure in TestArray#test_insert under indy

1 participant