aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-08 09:31:58 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-08 09:31:58 +0900
commitcb2323a98366bb7afb7b2fee2547804bbbc9d345 (patch)
tree4c41c15823a8406f2b5bf3a829ffba7f04b0be75 /spec/ruby
parentb14f133054bb04e1187f9897fa546faa433d37e7 (diff)
downloadruby-cb2323a98366bb7afb7b2fee2547804bbbc9d345.tar.gz
Thread#native_thread_id is very platform specific
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/thread/native_thread_id_spec.rb4
1 files changed, 3 insertions, 1 deletions
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 @@
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)