diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-11-12 18:34:49 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-12-13 20:47:07 +0900 |
commit | 6183addf6a4b94db7fe5b9187ac66fa11c8d2825 (patch) | |
tree | d817503b800ab354843ac1184765fd48513b0884 /test/ruby/test_exception.rb | |
parent | f3b1b645edfc5a8c938da74a5ed44564b9e2fc08 (diff) |
Add `Warning.[]` and `Warning.[]=`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2739
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r-- | test/ruby/test_exception.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 05cc109b48..56cd19d0a2 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1259,6 +1259,12 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| }; end + def test_warning_category + assert_raise(TypeError) {Warning[nil]} + assert_raise(ArgumentError) {Warning[:XXXX]} + assert_include([true, false], Warning[:deprecated]) + end + def test_undefined_backtrace assert_separately([], "#{<<-"begin;"}\n#{<<-"end;"}") begin; |