Skip to content

Do not assign backref from String#split#6646

Merged
headius merged 1 commit intojruby:masterfrom
headius:no_split_backref
May 19, 2021
Merged

Do not assign backref from String#split#6646
headius merged 1 commit intojruby:masterfrom
headius:no_split_backref

Conversation

@headius
Copy link
Member

@headius headius commented Mar 31, 2021

String#split only appears to clear the backref, and only when
passed a Regexp, so remove that logic and the frame flag for
BACKREF writes.

Any code relying on split to clear backref would be fragile, since
altering the split to use a string would break that expectation.

See #6644.

@headius headius added this to the JRuby 9.3.0.0 milestone Mar 31, 2021
@headius headius marked this pull request as ready for review April 1, 2021 23:26
String#split only appears to clear the backref, and only when
passed a Regexp, so remove that logic and the frame flag for
BACKREF writes.

Any code relying on split to clear backref would be fragile, since
altering the split to use a string would break that expectation.
@headius headius force-pushed the no_split_backref branch from 8417e2d to b88a4f4 Compare May 17, 2021 21:57
@headius headius merged commit 3ebc46b into jruby:master May 19, 2021
@headius headius deleted the no_split_backref branch May 19, 2021 18:52
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.

1 participant