Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > Regexpクラス > casefold?

instance method Regexp#casefold?

casefold? -> bool

正規表現が大文字小文字の判定をしないようにコンパイルされている時、 真を返します。

reg = Regexp.new("foobar", Regexp::IGNORECASE)
p reg.casefold? #=> true

reg = Regexp.new("hogehoge")
p reg.casefold? #=> false
class Regexp