Skip to content

Recognize BSD hosts in Underlying.bsd? - #87

Open
OskarEichler wants to merge 2 commits into
rdp:masterfrom
OskarEichler:codex/detect-bsd-families
Open

OskarEichler wants to merge 2 commits into
rdp:masterfrom
OskarEichler:codex/detect-bsd-families

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

OS::Underlying.bsd? returns false on FreeBSD, OpenBSD, NetBSD and DragonFly because it only delegates to the macOS predicate. Recognize those host families alongside Darwin.

Reproduction and verification

Checked eight synthetic host_os values. These are platform stubs on macOS, not native BSD execution.

  • External focused repro corpus: 8 checks pass against this isolated branch, under rbenv Ruby 4.0.6.
  • Existing upstream suite: 36 examples, zero failures before and after the patch (RBENV_VERSION=4.0.6 rbenv exec rspec -Ilib -Ispec).
  • Source-only change; no existing tests modified or new test files added, per the contributor's task constraint. The focused corpus lives outside the repository.
  • Local verification was on macOS. Other Ruby versions and native operating systems were not executed. Upstream RuboCop configuration cannot load its legacy rubocop-lts1_8.yml, including after installing current rubocop-lts; lint status is not represented as passing.

Breaking-change notes

No API removal; affected BSD hosts now correctly return true. Darwin remains true and Linux, Solaris and Windows remain false.

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