Thread#native_thread_id is very platform specific

This commit is contained in:
Nobuyoshi Nakada 2022-11-08 09:31:58 +09:00
parent b14f133054
commit cb2323a983
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,8 @@
require_relative '../../spec_helper'
ruby_version_is "3.1" do
if ruby_version_is "3.1" and Thread.method_defined?(:native_thread_id)
# This method is very platform specific
describe "Thread#native_thread_id" do
it "returns an integer when the thread is alive" do
Thread.current.native_thread_id.should be_kind_of(Integer)