Ruby 2.0.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Regexpクラス > ==
self == other -> bool[permalink][rdoc]eql?(other) -> boolotherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。
p /^eee$/ == /~eee$/x #=> false
p /^eee$/ == /~eee$/i #=> false
p /^eee$/e == /~eee$/u #=> false
p /^eee$/ == Regexp.new("^eee$") #=> true
p /^eee$/.eql?(/^eee$/) #=> true