Method: Regexp.timeout
- Defined in:
- re.c
.timeout ⇒ Float?
It returns the current default timeout interval for Regexp matching in second. nil
means no default timeout configuration.
4704 4705 4706 4707 4708 4709 4710 |
# File 're.c', line 4704
static VALUE
rb_reg_s_timeout_get(VALUE dummy)
{
double d = hrtime2double(rb_reg_match_time_limit);
if (d == 0.0) return Qnil;
return DBL2NUM(d);
}
|