summaryrefslogtreecommitdiff
path: root/test/monitor
diff options
context:
space:
mode:
Diffstat (limited to 'test/monitor')
-rw-r--r--test/monitor/test_monitor.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/monitor/test_monitor.rb b/test/monitor/test_monitor.rb
index 950db917e6..721c848d68 100644
--- a/test/monitor/test_monitor.rb
+++ b/test/monitor/test_monitor.rb
@@ -223,6 +223,19 @@ class TestMonitor < Test::Unit::TestCase
assert_join_threads([th, th2])
end
+ class NewCondTest
+ include MonitorMixin
+ attr_reader :cond
+ def initialize
+ @cond = new_cond
+ super # mon_initialize
+ end
+ end
+
+ def test_new_cond_before_initialize
+ assert NewCondTest.new.cond.instance_variable_get(:@monitor) != nil
+ end
+
def test_timedwait
cond = @monitor.new_cond
b = "foo"