End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Regexp#hash
rxp.hash → integer
re.c
View on GitHub ↗
static VALUE
rb_reg_hash(VALUE re)
{
st_index_t hashval = reg_hash(re);
return ST2FIX(hashval);
}
Produce a hash based on the text and options of this regular expression.
See also Object#hash.