method

eql?

ruby latest stable - Class: MatchData
eql?(p1)
public

Equality—Two matchdata are equal if their target strings, patterns, and matched positions are identical.