summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2020-09-28 10:10:31 -0700
committerJeremy Evans <[email protected]>2020-12-18 09:54:11 -0800
commit05313c914b29f7027b27a91021ae2662f0149e54 ()
tree5c0b7276204a8ab9166befc9092cd45871a05aed /test/ruby/test_regexp.rb
parent6ced55b07cf00e4ce8ffac5762f10e8ff1ecc59b (diff)
Use category: :deprecated in warnings that are related to deprecation
Also document that both :deprecated and :experimental are supported :category option values. The locations where warnings were marked as deprecation warnings was previously reviewed by shyouhei. Comment a couple locations where deprecation warnings should probably be used but are not currently used because deprecation warning enablement has not occurred at the time they are called (RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K). Add assert_deprecated_warn to test assertions. Use this to simplify some tests, and fix failing tests after marking some warnings with deprecated category.
Notes: Merged: https://.com/ruby/ruby/pull/3917
-rw-r--r--test/ruby/test_regexp.rb6
1 files changed, 3 insertions, 3 deletions
@@ -42,7 +42,7 @@ class TestRegexp < Test::Unit::TestCase
def test_yoshidam_net_20041111_1
s = "[\xC2\xA0-\xC3\xBE]"
- r = assert_warning(/ignored/) {Regexp.new(s, nil, "u")}
assert_match(r, "\xC3\xBE")
end
@@ -665,9 +665,9 @@ class TestRegexp < Test::Unit::TestCase
end
def test_ignorecase
- v = assert_warning(/variable \$= is no longer effective/) { $= }
assert_equal(false, v)
- assert_warning(/variable \$= is no longer effective; ignored/) { $= = nil }
end
def test_match_setter