diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-17 14:52:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-19 09:52:16 +0900 |
commit | 9bf9de3d9d2f67bc401151fb94abf75b5eff5913 (patch) | |
tree | 94d1c981d7e604834c3ee9a5072f24a8fd199e63 /test | |
parent | 76035e5bb6a5b44621fd1c11a0553780474d1c01 (diff) | |
download | ruby-9bf9de3d9d2f67bc401151fb94abf75b5eff5913.tar.gz |
Made the warning for deprecated constants follow the category flag
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_module.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 3ddfcd9c4f..2e7e5804d0 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -28,10 +28,13 @@ class TestModule < Test::Unit::TestCase def setup @verbose = $VERBOSE $VERBOSE = nil + @deprecated = Warning[:deprecated] + Warning[:deprecated] = true end def teardown $VERBOSE = @verbose + Warning[:deprecated] = @deprecated end def test_LT_0 @@ -1580,6 +1583,8 @@ class TestModule < Test::Unit::TestCase assert_warn(/#{c}::FOO is deprecated/) {Class.new(c)::FOO} bug12382 = '[ruby-core:75505] [Bug #12382]' assert_warn(/deprecated/, bug12382) {c.class_eval "FOO"} + Warning[:deprecated] = false + assert_warn('') {c::FOO} end NIL = nil |