ruby-changes:74390
From: Nobuyoshi <ko1@a...>
Date: Tue, 8 Nov 2022 09:32:18 +0900 (JST)
Subject: [ruby-changes:74390] cb2323a983 (master): Thread#native_thread_id is very platform specific
https://git.ruby-lang.org/ruby.git/commit/?id=cb2323a983 From cb2323a98366bb7afb7b2fee2547804bbbc9d345 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 8 Nov 2022 09:31:58 +0900 Subject: Thread#native_thread_id is very platform specific --- spec/ruby/core/thread/native_thread_id_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/ruby/core/thread/native_thread_id_spec.rb b/spec/ruby/core/thread/native_thread_id_spec.rb index 5a6c0c8632..d6cc332bf6 100644 --- a/spec/ruby/core/thread/native_thread_id_spec.rb +++ b/spec/ruby/core/thread/native_thread_id_spec.rb @@ -1,6 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/thread/native_thread_id_spec.rb#L1 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) -- cgit v1.2.3 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/