diff --git a/spec/ruby/core/mutex/sleep_spec.rb b/spec/ruby/core/mutex/sleep_spec.rb index 6638f5a5a2..9832e3125e 100644 --- a/spec/ruby/core/mutex/sleep_spec.rb +++ b/spec/ruby/core/mutex/sleep_spec.rb @@ -97,7 +97,7 @@ describe "Mutex#sleep" do m.lock times.each do |time| # just testing that sleep completes - m.sleep(time).should_not == nil + -> {m.sleep(time)}.should_not raise_error end end end