Repository navigation
Conversation
Copy lastIndex in the deep-clone path so global and sticky expressions resume at the source's match position. Leave the shared regex helper and R.test predicate behavior unchanged. Assisted-by: OpenAI GPT-6 (Codex) <noreply@openai.com> Assisted-by: OpenAI GPT-6 Luna <noreply@openai.com>
Coverage Summary> ramda@0.32.0 coverage:summary
> BABEL_ENV=cjs nyc --reporter=text-summary mocha -- --reporter=min --require @babel/register
�[2J�[1;3H
1234 passing (937ms)
=============================== Coverage summary ===============================
Statements : 94.09% ( 2565/2726 )
Branches : 85.95% ( 1009/1174 )
Functions : 93.39% ( 565/605 )
Lines : 94.35% ( 2406/2550 )
================================================================================ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cloning a global or sticky RegExp resets
lastIndex, so the clone can match differently from the original.Copy
lastIndexin the deep-clone path. Leave the helper used byR.testunchanged.Tests: new regression fails before the fix; 1,235 tests and lint pass after. Covers both flags, the next match, and independent cursor state.
I’ve reviewed the code.