rbs
rbs copied to clipboard
Update Thread signature and add test
Rarely I got the following error 🤔
-> I've found my change was wrong
$ ruby -e '30.times { system("bundle exec ruby test/stdlib/Thread_test.rb") }'
E, [2020-04-10T14:24:14.212185 #5411] ERROR -- : [Thread.new] BlockArgumentError: expected method type [X] (*X args) { (X) -> void } -> ::Thread ] 26% Time: 00:00:00, ETA: 00:00:00
FAIL["test_square_bracket_assign", #<Minitest::Reporters::Suite:0x0000562a05242ba8 @name="ThreadTest">, 0.01258758799667703]
test_square_bracket_assign#ThreadTest (0.01s)
Expected ["[Thread.new] BlockArgumentError: expected method type [X] (*X args) { (X) -> void } -> ::Thread"] to be empty.
/app/test/stdlib/test_helper.rb:109:in `teardown'
/app/lib/ruby/signature/test/hook.rb:171: warning: Thread#safe_level will be removed in Ruby 3.0================================================================================================================================================================== ] 72% Time: 00:00:00, ETA: 00:00:00
/app/lib/ruby/signature/test/hook.rb:171: warning: Thread.exclusive is deprecated, use Thread::Mutex
50/50: [========================================================================================================================================================================================================================================================================================================================================================] 100% Time: 00:00:00, Time: 00:00:00