Skip to content

Avoid repeated base path expansion#9712

Merged
hsbt merged 1 commit into
ruby:masterfrom
nobu:cache-expanded-base-path
Jul 23, 2026
Merged

Avoid repeated base path expansion#9712
hsbt merged 1 commit into
ruby:masterfrom
nobu:cache-expanded-base-path

Conversation

@nobu

@nobu nobu commented Jul 22, 2026

Copy link
Copy Markdown
Member

What was the end-user or developer problem that led to this PR?

glob_files_in_dir repeatedly expanded the same base path for every matched file, performing redundant work when processing multiple matches.

What is your fix for the problem, implemented in this PR?

Expand the base path once and reuse it when expanding each matched file, while preserving path normalization.

Make sure the following tasks are checked

Expand the glob base path only once while continuing to normalize each
matched path with `File.expand_path`.
@hsbt
hsbt merged commit cfe9516 into ruby:master Jul 23, 2026
106 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants