Method: MatchData#captures

Defined in:
lib/source/ruby.rb

#capturesObject

call-seq:

mtch.captures -> array

Returns the array of captures.

m = /(.)(.)(\d+)(\d)/.match("THX1138.").captures

m[0]    #=> "H"
m[1]    #=> "X"
m[2]    #=> "113"
m[3]    #=> "8"


3933
3934
3935
# File 'lib/source/ruby.rb', line 3933

def captures
  `this.__captures__.slice(1)`
end