Skip to content

Commit

Permalink
Change test for Mutex_m to not depend on RUBY_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jun 18, 2021
1 parent faff1d3 commit a62675e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/stdlib/Mutex_m_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ def test_mu_unlock
def test_sleep
mu = mu()
mu.lock
return_type = "Integer#{'?' if RUBY_VERSION >= '3.1'}"
assert_send_type "(Integer) -> #{return_type}",
assert_send_type "(Integer) -> Integer?",
mu, :sleep, 0
assert_send_type "(Float) -> #{return_type}",
assert_send_type "(Float) -> Integer?",
mu, :sleep, 0.1
end
end

0 comments on commit a62675e

Please sign in to comment.