This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

backtrace

        # Fiber.backtrace

(from ruby core)
---
    fiber.backtrace -> array
    fiber.backtrace(start) -> array
    fiber.backtrace(start, count) -> array
    fiber.backtrace(start..end) -> array

---

Returns the current execution stack of the fiber. `start`, `count` and
`end` allow to select only parts of the backtrace.

    def level3
      Fiber.yield
    end

    def level2
      level3
    end

    def level1
      level2
    end

    f = Fiber.new { level1 }

    # It is empty before the fiber started
    f.backtrace
    #=> []

    f.resume

    f.backtrace
    #=> ["test.rb:2:in `yield'", "test.rb:2:in `level3'", "test.rb:6:in `level2'", "test.rb:10:in `level1'", "test.rb:13:in `block in <main>'"]
    p f.backtrace(1) # start from the item 1
    #=> ["test.rb:2:in `level3'", "test.rb:6:in `level2'", "test.rb:10:in `level1'", "test.rb:13:in `block in <main>'"]
    p f.backtrace(2, 2) # start from item 2, take 2
    #=> ["test.rb:6:in `level2'", "test.rb:10:in `level1'"]
    p f.backtrace(1..3) # take items from 1 to 3
    #=> ["test.rb:2:in `level3'", "test.rb:6:in `level2'", "test.rb:10:in `level1'"]

    f.resume

    # It is nil after the fiber is finished
    f.backtrace
    #=> nil



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.