mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -1,15 +1,14 @@
|
|||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/classes'
|
||||
|
||||
describe "ThreadGroup#enclose" do
|
||||
before :each do
|
||||
@chan1,@chan2 = Channel.new,Channel.new
|
||||
@thread = Thread.new { @chan1 << :go; @chan2.receive }
|
||||
@chan1.receive
|
||||
@q1, @q2 = Queue.new, Queue.new
|
||||
@thread = Thread.new { @q1 << :go; @q2.pop }
|
||||
@q1.pop
|
||||
end
|
||||
|
||||
after :each do
|
||||
@chan2 << :done
|
||||
@q2 << :done
|
||||
@thread.join
|
||||
end
|
||||
|
||||
|
@ -18,7 +17,7 @@ describe "ThreadGroup#enclose" do
|
|||
default_group = @thread.group
|
||||
thread_group.add(@thread)
|
||||
thread_group.enclose
|
||||
lambda do
|
||||
-> do
|
||||
default_group.add(@thread)
|
||||
end.should raise_error(ThreadError)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue