End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Regexp#casefold?
rxp.casefold? → true or false
re.c
View on GitHub ↗
static VALUE
rb_reg_casefold_p(VALUE re)
{
rb_reg_check(re);
if (RREGEXP_PTR(re)->options & ONIG_OPTION_IGNORECASE) return Qtrue;
return Qfalse;
}
Returns the value of the case-insensitive flag.
Example
/a/.casefold? #=> false /a/i.casefold? #=> true /(?i:a)/.casefold? #=> false