Skip to content

Fix length handling in select!/reject! ensure#7980

Merged
headius merged 1 commit intojruby:masterfrom
headius:select_relect_loop_fixes
Oct 25, 2023
Merged

Fix length handling in select!/reject! ensure#7980
headius merged 1 commit intojruby:masterfrom
headius:select_relect_loop_fixes

Conversation

@headius
Copy link
Member

@headius headius commented Oct 25, 2023

The logic here had diverged somewhat from CRuby's logic, and did not reacquire the array's begin or length as in CRuby. This led to bad length calculation when there were additional mutations during the select!/reject! loop.

Fixes #7976

The logic here had diverged somewhat from CRuby's logic, and did
not reacquire the array's begin or length as in CRuby. This led to
bad length calculation when there were additional mutations during
the select!/reject! loop.

Fixes jruby#7976
@headius headius added this to the JRuby 9.4.5.0 milestone Oct 25, 2023
@headius headius merged commit eefc0dd into jruby:master Oct 25, 2023
@headius headius deleted the select_relect_loop_fixes branch October 25, 2023 20:00
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.

.delete_if blocks allow deleting same object from array twich

1 participant