summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-05-26 18:02:06 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-05-26 18:02:06 +0900
commit055ec5254dc79cfa5d9500b8c301751fe594e481 (patch)
treeb4a3c0d2a361810d44f7a1fad59c541c5ef19713
parent251fafec1b981076d6ba589ace2a4aa9502cbad2 (diff)
Rescue NotImplementedError for a test of Thread#native_thread_id
http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20210526T070003Z.fail.html.gz ``` 1) Error: TestThread#test_thread_native_thread_id: NotImplementedError: native_thread_id() function is unimplemented on this machine /export/home/users/chkbuild/cb-gcc/tmp/build/20210526T070003Z/ruby/test/ruby/test_thread.rb:1338:in `native_thread_id' /export/home/users/chkbuild/cb-gcc/tmp/build/20210526T070003Z/ruby/test/ruby/test_thread.rb:1338:in `test_thread_native_thread_id' ```
-rw-r--r--test/ruby/test_thread.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index d87160a2a8..a16f066dc7 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -1335,7 +1335,7 @@ q.pop
end
def test_thread_native_thread_id
- skip "don't support native_thread_id" unless (Thread.main.native_thread_id rescue nil)
+ skip "don't support native_thread_id" unless (begin; Thread.main.native_thread_id; rescue NotImplementedError; nil; end)
assert_instance_of Integer, Thread.main.native_thread_id
th1 = Thread.start{sleep}