Always use full logic for processing glob segments.#5378
Merged
headius merged 2 commits intojruby:masterfrom Oct 25, 2018
Merged
Always use full logic for processing glob segments.#5378headius merged 2 commits intojruby:masterfrom
headius merged 2 commits intojruby:masterfrom
Conversation
This is a workaround for issues found in jruby#5333. I discovered while researching a fix for that bug that our `glob_helper` appears to be missing "else" logic for the segment processing that handles magic characters and unescaping. Put simply, if there's no magic in the segment it leaves it entirely unprocessed, allowing its contents to just get rolled into the next segment loop (which may or may not also have magic). However this leaves escapes in place. This "fix" basically just omits the magic check for each segment and allows full processing.
Member
Author
|
This did not pass but it seems like the only failures are for jarred Ruby scripts/gems. I'll see if I can suss out why those are now failing. |
Member
Author
|
It looks like limiting my change to only segments that contain |
This narrows my fix to only fire for segments with magic chars (* and ? and the like) or backslashes in the presence of escaped mode (i.e. not FNM_NOESCAPE). This will slow down the processing of segments that contain only backslash escapes, but they were not processed properly before anyway. Segments without backslashes or magic characters are unaffected. Segments with backslashes and magic characters are unaffected.
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.
This is a workaround for issues found in #5333. I discovered while
researching a fix for that bug that our
glob_helperappears tobe missing "else" logic for the segment processing that handles
magic characters and unescaping. Put simply, if there's no magic
in the segment it leaves it entirely unprocessed, allowing its
contents to just get rolled into the next segment loop (which may
or may not also have magic). However this leaves escapes in place.
This "fix" basically just omits the magic check for each segment
and allows full processing.