Skip to content

Commit

Permalink
Use Thread.pass in loop{} to check interrupts more often
Browse files Browse the repository at this point in the history
* The spec now runs in ~5ms vs ~100ms before.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
eregon committed Apr 25, 2018
1 parent 067066f commit 66058dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/ruby/core/thread/raise_spec.rb
Expand Up @@ -151,7 +151,7 @@
1/0
rescue ZeroDivisionError
raised = true
loop { }
loop { Thread.pass }
end
end
begin
Expand Down

0 comments on commit 66058dd

Please sign in to comment.