Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/thread.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ class Thread < Object
# native thread, it returns *nil*. If the Ruby implementation uses M:N thread
# model, the ID may change depending on the timing.
#
def native_thread_id: () -> Integer
def native_thread_id: () -> Integer?

# <!--
# rdoc-file=thread.c
Expand Down
2 changes: 2 additions & 0 deletions test/stdlib/Thread_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def test_native_thread_id
"() -> Integer",
Thread.current, :native_thread_id
)

assert_send_type "() -> nil", Thread.new{}.join, :native_thread_id
end

def test_raise
Expand Down
Loading