From: qqshfox@... Date: 2014-12-04T10:28:12+00:00 Subject: [ruby-core:66685] [ruby-trunk - Bug #10567] [Open] A fiber issue with `autoload`: `fiber called across stack rewinding barrier (FiberError)` Issue #10567 has been reported by Hanfei Shen. ---------------------------------------- Bug #10567: A fiber issue with `autoload`: `fiber called across stack rewinding barrier (FiberError)` https://bugs.ruby-lang.org/issues/10567 * Author: Hanfei Shen * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby-2.1.5 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- We have two ruby files as following: test.rb autoload :User, './user.rb' f = Fiber.new do p User end f.resume f.resume user.rb class User end Fiber.yield # This line is important If I run the `test.rb`, i got the a `FiberError` on Ruby 2.x but not on Ruby 1.9.3 $ rvm 1.9.3,2.0,2.1 do sh -c 'echo ==== $RUBY_VERSION; ruby test.rb' ==== ruby-1.9.3-p551 User ==== ruby-2.0.0-p598 user.rb:4:in `yield': fiber called across stack rewinding barrier (FiberError) from user.rb:4:in `' from test.rb:4:in `block in
' ==== ruby-2.1.5 user.rb:4:in `yield': fiber called across stack rewinding barrier (FiberError) from user.rb:4:in `' from test.rb:4:in `block in
' More sample codes are in this repo: https://github.com/qqshfox/test_fiber Is this intentional? -- https://bugs.ruby-lang.org/