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

to_a

        # MatchData.to_a

(from ruby core)
---
    mtch.to_a   -> anArray

---

Returns the array of matches.

    m = /(.)(.)(\d+)(\d)/.match("THX1138.")
    m.to_a   #=> ["HX1138", "H", "X", "113", "8"]

Because `to_a` is called when expanding `*`*variable*, there's a useful
assignment shortcut for extracting matched fields. This is slightly
slower than accessing the fields directly (as an intermediate array is
generated).

    all,f1,f2,f3 = * /(.)(.)(\d+)(\d)/.match("THX1138.")
    all   #=> "HX1138"
    f1    #=> "H"
    f2    #=> "X"
    f3    #=> "113"



      

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.