inspect()
public
Produce a nicely formatted string-version of rxp. Perhaps
surprisingly, #inspect actually produces
the more natural version of the string than #to_s.
/ab+c/ix.inspect
Show source
static VALUE
rb_reg_inspect(VALUE re)
{
if (!RREGEXP(re)->ptr || !RREGEXP_SRC(re) || !RREGEXP_SRC_PTR(re)) {
return rb_any_to_s(re);
}
return rb_reg_desc(RREGEXP_SRC_PTR(re), RREGEXP_SRC_LEN(re), re);
}