Repository navigation
fix string-any/string-every to honor the start argument - #1195
Open
jordanlhenderson wants to merge 1 commit into
Open
jordanlhenderson wants to merge 1 commit into
jordanlhenderson wants to merge 1 commit into
Conversation
The optional start argument added in 2b7927b was used only in the emptiness check; the scan always began at the start of the string, so (string-any pred str start end) examined [0, end). string-every, defined as the complement of string-any, inherited the defect, and (srfi 130) re-exports both, so ranged calls violated SRFI 130. Bind start once and start the loop there. Add ranged tests with indexes and cursors to the srfi 130 and (chibi string) suites. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MHtb28AgcXCooRRkPyqSUH
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.
string-anyaccepts optionalstart/end(indexes or cursors) but usedstartonly in its emptiness check; the scan always began at(string-cursor-start str), so(string-any pred str start end)examined[0, end).string-everyis the complement ofstring-anyand inherited this, and(srfi 130)re-exports both, so ranged calls violated SRFI 130. Present since 2b7927b added the optional arguments.Fix: bind
startonce and start the loop there. Adds ranged tests with indexes and cursors to the SRFI 130 and(chibi string)suites.make test-allandmake test-safe-string-cursorspass.