sub(*args)
public
Equivalent to $_.sub(args), except
that $_ will be updated if substitution occurs. Available only when -p/-n
command line option specified.
Show source
static VALUE
rb_f_sub(int argc, VALUE *argv)
{
VALUE str = rb_funcall_passing_block(uscore_get(), rb_intern("sub"), argc, argv);
rb_lastline_set(str);
return str;
}