Issue #17408 has been updated by marcandre (Marc-Andre Lafortune).


ioquatix (Samuel Williams) wrote in #note-3:
> > should be nil
> 
> when the fiber is dead.

Right. Doc does call `resume` but not this issue. Correct code should read:

```ruby
f = Fiber.new{}
f.resume
f.backtrace # => currently [] (should be nil)
```

----------------------------------------
Bug #17408: Fiber.backtrace returns [] when unavailable, unlike Thread
https://bugs.ruby-lang.org/issues/17408#change-89413

* Author: zverok (Victor Shepelev)
* Status: Closed
* Priority: Normal
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
```ruby
t = Thread.new{}
p t.backtrace
# => nil

f = Fiber.new{}
p f.backtrace
# => []
```

It seems inconsistent, is this intentional?

Ping @ioquatix



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>