summaryrefslogtreecommitdiff
path: root/spec/ruby/library/fiber/current_spec.rb
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/library/fiber/current_spec.rb
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/library/fiber/current_spec.rb')
-rw-r--r--spec/ruby/library/fiber/current_spec.rb20
1 files changed, 6 insertions, 14 deletions
diff --git a/spec/ruby/library/fiber/current_spec.rb b/spec/ruby/library/fiber/current_spec.rb
index 48345fb7cf..fd68cd52ea 100644
--- a/spec/ruby/library/fiber/current_spec.rb
+++ b/spec/ruby/library/fiber/current_spec.rb
@@ -10,7 +10,7 @@ with_feature :fiber_library do
# We can always transfer to the root Fiber; it will never die
5.times do
root.transfer.should be_nil
- root.alive?.should_not be_false #Workaround for bug #1547
+ root.alive?.should be_true
end
end
@@ -19,39 +19,31 @@ with_feature :fiber_library do
this = Fiber.current
this.should be_an_instance_of(Fiber)
this.should == fiber
- this.alive?.should_not be_false # Workaround for bug #1547
+ this.alive?.should be_true
end
fiber.resume
end
it "returns the current Fiber when called from a Fiber that transferred to another" do
-
states = []
fiber = Fiber.new do
states << :fiber
this = Fiber.current
this.should be_an_instance_of(Fiber)
- this.should === fiber
- this.alive?.should_not be_false # Workaround for bug #1547
+ this.should == fiber
+ this.alive?.should be_true
end
fiber2 = Fiber.new do
states << :fiber2
fiber.transfer
- this = Fiber.current
- this.should be_an_instance_of(Fiber)
- this.should === fiber2
- this.alive?.should_not be_false # Workaround for bug #1547
+ flunk
end
fiber3 = Fiber.new do
states << :fiber3
fiber2.transfer
- this = Fiber.current
- this.should be_an_instance_of(Fiber)
- this.should === fiber3
- this.alive?.should_not be_false # Workaround for bug #1547
- fiber2.transfer
+ flunk
end
fiber3.resume