Skip to content

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
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro added this to the RBS 3.7 milestone Nov 28, 2024
@soutaro soutaro enabled auto-merge November 28, 2024 05:57
@soutaro soutaro added this pull request to the merge queue Nov 28, 2024
Merged via the queue into ruby:master with commit 6bbd274 Nov 28, 2024
18 checks passed
@pocke pocke deleted the Fix_return_type_of__Process_detach__to_return__Process__Waiter_ branch November 28, 2024 07:55
@soutaro soutaro added the Released PRs already included in the released version label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Released PRs already included in the released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants