summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2022-03-31 10:07:09 +0900
committerYusuke Endoh <[email protected]>2022-03-31 10:07:09 +0900
commitc499a4c28a62813752aeb894d68d92fcec850ac0 ()
treed897a20dd478f98ef11a878b33d8d26d78e3f037 /test/ruby/test_regexp.rb
parent3a70d4cd60d0b0765d44792d226a1f2ffc38c931 (diff)
re.c: stop a wrong warning of "flags ignored" on Regexp.new(//)
[Bug #18669]
-rw-r--r--test/ruby/test_regexp.rb2
1 files changed, 2 insertions, 0 deletions
@@ -557,6 +557,8 @@ class TestRegexp < Test::Unit::TestCase
def test_initialize
assert_raise(ArgumentError) { Regexp.new }
assert_equal(/foo/, assert_warning(/ignored/) {Regexp.new(/foo/, Regexp::IGNORECASE)})
assert_equal(Encoding.find("US-ASCII"), Regexp.new("b..", nil, "n").encoding)
assert_equal("bar", "foobarbaz"[Regexp.new("b..", nil, "n")])