Module: Prism::RegularExpressionOptions
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/prism/node_ext.rb |
Instance Method Summary
-
#options
Returns a numeric value that represents the flags that were used to create the regular expression.
Instance Method Details
#options
Returns a numeric value that represents the flags that were used to create the regular expression.
# File 'lib/prism/node_ext.rb', line 9
def o = flags & (RegularExpressionFlags::IGNORE_CASE | RegularExpressionFlags::EXTENDED | RegularExpressionFlags::MULTI_LINE) o |= Regexp::FIXEDENCODING if flags.anybits?(RegularExpressionFlags::EUC_JP | RegularExpressionFlags::WINDOWS_31J | RegularExpressionFlags::UTF_8) o |= Regexp::NOENCODING if flags.anybits?(RegularExpressionFlags::ASCII_8BIT) o end