instance method Regexp#==
self == other -> bool
eql?(other) -> bool
-
otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。
- [PARAM] other:
- 正規表現を指定します。
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
class Regexp