diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-06-01 22:27:13 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-06-01 22:27:13 +0900 |
commit | 9024c7f1bb3ea432a2b52e7c701b06f83aafd4d5 (patch) | |
tree | 0b52d7bc67fde0fcfd4fb30bd2f91c121b0e7b49 /test/ruby/test_thread.rb | |
parent | 6e7e9a80adfe69e6e6d20e01997b97a5c24cd33e (diff) |
Make `Thread#native_thread_id` not-implemented if unsupported
Raise `NotImplementedError` on unsupported platforms regardless
the argument consistently.
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index a16f066dc7..dbd0328e28 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 (begin; Thread.main.native_thread_id; rescue NotImplementedError; nil; end) + skip "don't support native_thread_id" unless Thread.method_defined?(:native_thread_id) assert_instance_of Integer, Thread.main.native_thread_id th1 = Thread.start{sleep} |