aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2022-12-28 08:08:12 -0800
committerJeremy Evans <code@jeremyevans.net>2023-03-01 23:42:47 -0800
commit04cfb26bd394b8e92f24f18799f5e9fc96b2ea69 (patch)
treec69d184ad304f43f37334c908b365d3c1189d304 /test/ruby/test_regexp.rb
parent6207a3f588ae0d0f7eb6303f7cccbe19f37ba6d1 (diff)
downloadruby-04cfb26bd394b8e92f24f18799f5e9fc96b2ea69.tar.gz
Remove support for the Regexp.new 3rd argument
This was deprecated in Ruby 3.2. Fixes [Bug #18797]
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb32
1 files changed, 0 insertions, 32 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index c871580aeb..4a2ee9dc4c 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -40,19 +40,6 @@ class TestRegexp < Test::Unit::TestCase
assert_equal("a".gsub(/a\Z/, ""), "")
end
- def test_yoshidam_net_20041111_1
- s = "[\xC2\xA0-\xC3\xBE]"
- r = assert_deprecated_warning(/3\.3/) {Regexp.new(s, nil, "u")}
- assert_match(r, "\xC3\xBE")
- end
-
- def test_yoshidam_net_20041111_2
- assert_raise(RegexpError) do
- s = "[\xFF-\xFF]".force_encoding("utf-8")
- assert_warning(/3\.3/) {Regexp.new(s, nil, "u")}
- end
- end
-
def test_ruby_dev_31309
assert_equal('Ruby', 'Ruby'.sub(/[^a-z]/i, '-'))
end
@@ -715,25 +702,6 @@ class TestRegexp < Test::Unit::TestCase
assert_equal(arg_encoding_none, Regexp.new("", Regexp::NOENCODING).options)
end
- assert_deprecated_warning(/3\.3/) do
- assert_equal(Encoding.find("US-ASCII"), Regexp.new("b..", nil, "n").encoding)
- end
- assert_deprecated_warning(/3\.3/) do
- assert_equal(Encoding.find("US-ASCII"), Regexp.new("b..", nil, "n", timeout: 1).encoding)
- end
- assert_deprecated_warning(/3\.3/) do
- assert_equal("bar", "foobarbaz"[Regexp.new("b..", nil, "n")])
- end
- assert_deprecated_warning(/3\.3/) do
- assert_equal(//n, Regexp.new("", nil, "n"))
- end
- assert_deprecated_warning(/3\.3/) do
- assert_equal(arg_encoding_none, Regexp.new("", nil, "n").options)
- end
- assert_deprecated_warning(/3\.3/) do
- assert_equal(arg_encoding_none, Regexp.new("", nil, "N").options)
- end
-
assert_raise(RegexpError) { Regexp.new(")(") }
assert_raise(RegexpError) { Regexp.new('[\\40000000000') }
assert_raise(RegexpError) { Regexp.new('[\\600000000000.') }