Class: MatchData

Inherits:
Object
  • Object
show all
Defined in:
lib/oniguruma.rb

Instance Method Summary collapse

Instance Method Details

#[](*idx) ⇒ Object



363
364
365
366
367
368
369
370
# File 'lib/oniguruma.rb', line 363

def [](*idx)
  if idx[0].is_a?(Symbol) 
    k = @named_captures && @named_captures[idx[0]]
    k && old_aref(k)
  else
    old_aref(*idx)
  end
end

#old_arefObject



362
# File 'lib/oniguruma.rb', line 362

alias old_aref :[]