summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2022-12-20 17:59:46 +0100
committerBenoit Daloze <eregontp@gmail.com>2022-12-20 19:32:23 +0100
commit45175962a6fd74ab2e9ba92f1280f3987af25494 (patch)
tree7a4fcccfd76b12ffdc853a93822ba74b56b4e6e6 /spec/ruby
parent88040063d0ec8aa64e0de2a3afae7286ec53bfdb (diff)
downloadruby-45175962a6fd74ab2e9ba92f1280f3987af25494.tar.gz
Never use the storage of another Fiber, that violates the whole design
* See https://bugs.ruby-lang.org/issues/19078#note-30
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/fiber/storage_spec.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/spec/ruby/core/fiber/storage_spec.rb b/spec/ruby/core/fiber/storage_spec.rb
index 4adfd30d2b..c0958d98ee 100644
--- a/spec/ruby/core/fiber/storage_spec.rb
+++ b/spec/ruby/core/fiber/storage_spec.rb
@@ -22,14 +22,6 @@ describe "Fiber.new(storage:)" do
fiber.resume.should == {life: 42}
end
- it "creates a fiber with a reference to the storage of the parent fiber" do
- fiber = Fiber.new(storage: {life: 42}) do
- Fiber.new(storage: false) { Fiber[:life] = 43 }.resume
- Fiber.current.storage
- end
- fiber.resume.should == {life: 43}
- end
-
it "cannot create a fiber with non-hash storage" do
-> { Fiber.new(storage: 42) {} }.should raise_error(TypeError)
end