We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 024ae41 commit d690322Copy full SHA for d690322
1 file changed
library/fiber/resume_spec.rb
@@ -10,6 +10,12 @@
10
fiber2.resume
11
-> { fiber2.resume }.should raise_error(FiberError)
12
end
13
+
14
+ it "raises a FiberError if the Fiber attempts to resume a resuming fiber" do
15
+ root_fiber = Fiber.current
16
+ fiber1 = Fiber.new { root_fiber.resume }
17
+ -> { fiber1.resume }.should raise_error(FiberError, /double resume/)
18
+ end
19
20
21
ruby_version_is '3.0' do
@@ -19,5 +25,11 @@
25
fiber2.resume.should == 10
26
fiber2.resume.should == 20
27
28
29
30
31
32
+ -> { fiber1.resume }.should raise_error(FiberError, /attempt to resume a resuming fiber/)
33
22
34
23
35
0 commit comments