summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:51:35 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:51:35 +0000
commitac2d608e518568ff20bfb2f2d40af879a132a831 (patch)
tree9549cc8d4c5ec4c87a77e45e0686c4389b971554
parent687fd3a1e394b81398070ed660679c071e982ee8 (diff)
merges r25418 from trunk into ruby_1_9_1.
-- * added monitor.rb test. see #2240 the bug on ruby_1_8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/monitor/test_monitor.rb27
-rw-r--r--version.h2
2 files changed, 28 insertions, 1 deletions
diff --git a/test/monitor/test_monitor.rb b/test/monitor/test_monitor.rb
index 064471eecb..973b3c2744 100644
--- a/test/monitor/test_monitor.rb
+++ b/test/monitor/test_monitor.rb
@@ -54,6 +54,32 @@ class TestMonitor < Test::Unit::TestCase
assert_equal((1..10).to_a, ary)
end
+ def test_killed_thread_in_synchronize
+ ary = []
+ queue = Queue.new
+ t1 = Thread.start {
+ queue.pop
+ @monitor.synchronize {
+ ary << :t1
+ }
+ }
+ t2 = Thread.start {
+ queue.pop
+ @monitor.synchronize {
+ ary << :t2
+ }
+ }
+ @monitor.synchronize do
+ queue.enq(nil)
+ queue.enq(nil)
+ assert_equal([], ary)
+ t1.kill
+ t2.kill
+ ary << :main
+ end
+ assert_equal([:main], ary)
+ end
+
def test_try_enter
queue1 = Queue.new
queue2 = Queue.new
@@ -97,6 +123,7 @@ class TestMonitor < Test::Unit::TestCase
end
def _test_timedwait
+ cond = @monitor.new_cond
b = "foo"
queue2 = Queue.new
Thread.start do
diff --git a/version.h b/version.h
index 874e1fe52d..937729d23d 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.1"
-#define RUBY_PATCHLEVEL 403
+#define RUBY_PATCHLEVEL 404
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1