Actions
Bug #17408
closedFiber.backtrace returns [] when unavailable, unlike Thread
Description
t = Thread.new{}
p t.backtrace
# => nil
f = Fiber.new{}
p f.backtrace
# => []
It seems inconsistent, is this intentional?
Updated by marcandre (Marc-Andre Lafortune) over 4 years ago
Good catch.
@ioquatix (Samuel Williams) confirms it should be nil
and is looking into it.
I'll update the doc.
Updated by Anonymous over 4 years ago
- Status changed from Open to Closed
Applied in changeset git|d0050edb84e9c3ba99946e08325e168deb741e28.
Update Fiber#backtrace doc [See bug #17408]
Updated by ioquatix (Samuel Williams) over 4 years ago
should be nil
when the fiber is dead.
Updated by marcandre (Marc-Andre Lafortune) over 4 years ago
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:
f = Fiber.new{}
f.resume
f.backtrace # => currently [] (should be nil)
Actions
Like0
Like0Like0Like0Like0