Skip to content

Guard specs needing #fork with guard -> { Process.respond_to?(:fork) } do#1372

Merged
eregon merged 2 commits into
masterfrom
guard-fork-specs
Jun 2, 2026
Merged

Guard specs needing #fork with guard -> { Process.respond_to?(:fork) } do#1372
eregon merged 2 commits into
masterfrom
guard-fork-specs

Conversation

@eregon
Copy link
Copy Markdown
Member

@eregon eregon commented Jun 2, 2026

  • Previously they would use platform_is_not :windows do but fork() is in
    fact platform-dependent and not available on more than just Windows.
    Notably, JRuby and TruffleRuby cannot implement #fork because the JVM
    does not support it (e.g. the GC expects threads to not die suddenly).
    This seems extremely unlikely to change so IOW the JVM is a platform
    which does not support fork().
  • Avoid using fork in Process specs

… } do`

* Previously they would use `platform_is_not :windows do` but fork() is in
  fact platform-dependent and not available on more than just Windows.
  Notably, JRuby and TruffleRuby cannot implement #fork because the JVM
  does not support it (e.g. the GC expects threads to not die suddenly).
  This seems extremely unlikely to change so IOW the JVM is a platform
  which does not support fork().
@eregon eregon force-pushed the guard-fork-specs branch 2 times, most recently from b38f96b to 4e7981f Compare June 2, 2026 22:10
@eregon eregon force-pushed the guard-fork-specs branch from 4e7981f to a3846bf Compare June 2, 2026 22:20
@eregon eregon merged commit 27177fd into master Jun 2, 2026
14 checks passed
@eregon eregon deleted the guard-fork-specs branch June 2, 2026 22:20
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