diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-06-16 18:53:35 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-06-20 19:35:12 +0900 |
commit | 1e9939dae24db232d6f3693630fa37a382e1a6d7 () | |
tree | 7bb1660444a068ce185c4ef636467861b40cae6c /test | |
parent | 39dc455b511614ee8a1911c0ba6445a0307d5e4f (diff) |
[Feature #18788] Support options as `String` to `Regexp.new`
`Regexp.new` now supports passing the regexp flags not only as an `Integer`, but also as a `String. Unknown flags raise errors.
Notes: Merged: https://.com/ruby/ruby/pull/6039
-rw-r--r-- | test/ruby/test_regexp.rb | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -634,6 +634,23 @@ class TestRegexp < Test::Unit::TestCase end end def test_match_control_meta_escape assert_equal(0, /\c\xFF/ =~ "\c\xFF") assert_equal(0, /\c\M-\xFF/ =~ "\c\M-\xFF") |