summaryrefslogtreecommitdiff
path: root/spec/ruby/shared
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-28 09:19:59 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-28 09:19:59 +0000
commit52d2636f3e7658f76136310359c2ba00e613d2bd (patch)
tree523a193924876ba20fe00debc3f45765fb21bd79 /spec/ruby/shared
parentc555bd7f01c531af8d33ed494b278a765381afd9 (diff)
Update to ruby/spec@691755d
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/shared')
-rw-r--r--spec/ruby/shared/fiber/resume.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/shared/fiber/resume.rb b/spec/ruby/shared/fiber/resume.rb
index 304cd88de1..a680839a4b 100644
--- a/spec/ruby/shared/fiber/resume.rb
+++ b/spec/ruby/shared/fiber/resume.rb
@@ -4,6 +4,11 @@ describe :fiber_resume, shared: true do
fiber.send(@method).should == :fiber
end
+ it "raises a FiberError if the Fiber tries to resume itself" do
+ fiber = Fiber.new { fiber.resume }
+ -> { fiber.resume }.should raise_error(FiberError, /double resume/)
+ end
+
it "raises a FiberError if invoked from a different Thread" do
fiber = Fiber.new { }
lambda do