Project

General

Profile

Actions

Bug #17408

closed

Fiber.backtrace returns [] when unavailable, unlike Thread

Bug #17408: Fiber.backtrace returns [] when unavailable, unlike Thread

Added by zverok (Victor Shepelev) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:101530]

Description

t = Thread.new{}
p t.backtrace
# => nil

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

It seems inconsistent, is this intentional?

Ping @ioquatix (Samuel Williams)

Updated by marcandre (Marc-Andre Lafortune) almost 5 years ago Actions #1

Good catch.

@ioquatix (Samuel Williams) confirms it should be nil and is looking into it.

I'll update the doc.

Updated by Anonymous almost 5 years ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|d0050edb84e9c3ba99946e08325e168deb741e28.


Update Fiber#backtrace doc [See bug #17408]

Updated by ioquatix (Samuel Williams) almost 5 years ago Actions #3 [ruby-core:101622]

should be nil

when the fiber is dead.

Updated by marcandre (Marc-Andre Lafortune) almost 5 years ago Actions #4 [ruby-core:101623]

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

Also available in: PDF Atom