Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix return type of Process.detach to return Process::Waiter #2083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pocke
Copy link
Member

@pocke pocke commented Nov 14, 2024

Process.detach returns a Process::Waiter, a subclass of Thread. But the RBS defines that it returns a Thread.

This PR fixes the return type to Process::Waiter.

Process.detach returns Process::Waiter since Ruby 2.2.

$ docker run -it --rm rubylang/all-ruby ./all-ruby -e 'p Process.detach(1).class'

(snip)

ruby-1.8.0            Thread
...
ruby-2.1.10           Thread
ruby-2.2.0-preview1   Process::Waiter
...
ruby-3.4.0-preview2   Process::Waiter

@pocke pocke force-pushed the Fix_return_type_of__Process_detach__to_return__Process__Waiter_ branch from 4d1c82b to 31ee679 Compare November 14, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant