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

disasm

        # RubyVM::InstructionSequence.disasm

(from ruby core)
### Implementation from InstructionSequence
---
    InstructionSequence.disasm(body) -> str
    InstructionSequence.disassemble(body) -> str

---

Takes `body`, a Method or Proc object, and returns a String with the
human readable instructions for `body`.

For a Method object:

    # /tmp/method.rb
    def hello
      puts "hello, world"
    end

    puts RubyVM::InstructionSequence.disasm(method(:hello))

Produces:

    == disasm: <RubyVM::InstructionSequence:hello@/tmp/method.rb>============
    0000 trace            8                                               (   1)
    0002 trace            1                                               (   2)
    0004 putself
    0005 putstring        "hello, world"
    0007 send             :puts, 1, nil, 8, <ic:0>
    0013 trace            16                                              (   3)
    0015 leave                                                            (   2)

For a Proc:

    # /tmp/proc.rb
    p = proc { num = 1 + 2 }
    puts RubyVM::InstructionSequence.disasm(p)

Produces:

    == disasm: <RubyVM::InstructionSequence:block in <main>@/tmp/proc.rb>===
    == catch table
    | catch type: redo   st: 0000 ed: 0012 sp: 0000 cont: 0000
    | catch type: next   st: 0000 ed: 0012 sp: 0000 cont: 0012
    |------------------------------------------------------------------------
    local table (size: 2, argc: 0 [opts: 0, rest: -1, post: 0, block: -1] s1)
    [ 2] num
    0000 trace            1                                               (   1)
    0002 putobject        1
    0004 putobject        2
    0006 opt_plus         <ic:1>
    0008 dup
    0009 setlocal         num, 0
    0012 leave


(from ruby core)
### Implementation from InstructionSequence
---
    iseq.disasm -> str
    iseq.disassemble -> str

---

Returns the instruction sequence as a `String` in human readable form.

    puts RubyVM::InstructionSequence.compile('1 + 2').disasm

Produces:

    == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
    0000 trace            1                                               (   1)
    0002 putobject        1
    0004 putobject        2
    0006 opt_plus         <ic:1>
    0008 leave



      

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.