aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/thread.rb2
-rw-r--r--test/ruby/test_thread.rb9
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/thread.rb b/lib/thread.rb
index 524db69a18..88e86ab2e1 100644
--- a/lib/thread.rb
+++ b/lib/thread.rb
@@ -82,7 +82,7 @@ class ConditionVariable
#
def signal
begin
- t = @waiters_mutex.synchronize { @waiters.shift }
+ t = @waiters_mutex.synchronize {@waiters.shift}
t.run if t
rescue ThreadError
retry
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 16af922e98..d5386c0cbe 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -67,13 +67,6 @@ class TestThread < Test::Unit::TestCase
assert_equal([0, 1, 2], result)
end
- def test_condvar_wait_not_owner
- mutex = Mutex.new
- condvar = ConditionVariable.new
-
- assert_raise(ThreadError) { condvar.wait(mutex) }
- end
-
def test_condvar_wait_exception_handling
# Calling wait in the only thread running should raise a ThreadError of
# 'stopping only thread'
@@ -194,7 +187,7 @@ class TestThread < Test::Unit::TestCase
mutex = Mutex.new
condvar = ConditionVariable.new
- assert_raise(ThreadError) { condvar.wait(mutex) }
+ assert_raise(ThreadError) {condvar.wait(mutex)}
end
def test_condvar_nolock_2