Skip to content

Dedupe and simplify standard_system_dir#713

Open
pvdb wants to merge 2 commits intoruby:masterfrom
pvdb:simplify_standard_system_dir
Open

Dedupe and simplify standard_system_dir#713
pvdb wants to merge 2 commits intoruby:masterfrom
pvdb:simplify_standard_system_dir

Conversation

@pvdb
Copy link
Copy Markdown
Contributor

@pvdb pvdb commented Apr 3, 2026

Hot on the heels of #669, this small refactor dedupes the multiple method definitions by inlining the Win32.windows? check, which means we don't end up with two different method implementations for the same thing, which is a tad confusing for e.g. ctags:

ctags

It also replaces the duplicated Win32.windows? check with the existing Rake::Application.windows? utility function, already used elsewhere in the class.

This in turn allowed me to add two explicit tests, one for the Windows behaviour, another one for the Unix behaviour; it does this by stubbing the Rake::Application.windows? utility function, which is indeed a tad strange, but both tests are modelled after the existing test_load_from_calculated_system_rakefile (which is arguably even stranger, as it needs to stub a private function in order to do its thing) 😃

@pvdb pvdb force-pushed the simplify_standard_system_dir branch from 825e366 to 496e60d Compare April 3, 2026 12:28
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