diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-17 17:16:12 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-12-19 09:52:17 +0900 |
commit | 7aa8a786740fd84bd718b0c055f190b25a8f0277 (patch) | |
tree | 5d837abc1cc14480b4bff966c8945b8bb66b4f4e /test/ruby/test_exception.rb | |
parent | 9bf9de3d9d2f67bc401151fb94abf75b5eff5913 (diff) |
Manage deprecation warnings about keyword argument
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r-- | test/ruby/test_exception.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 56cd19d0a2..c7cfe816b0 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1160,6 +1160,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| def capture_warning_warn verbose = $VERBOSE + deprecated = Warning[:deprecated] warning = [] ::Warning.class_eval do @@ -1172,11 +1173,13 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end $VERBOSE = true + Warning[:deprecated] = true yield return warning ensure $VERBOSE = verbose + Warning[:deprecated] = deprecated ::Warning.class_eval do remove_method :warn |