mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 00:54:01 +02:00
Add Warning.[]
and Warning.[]=
This commit is contained in:
parent
f3b1b645ed
commit
6183addf6a
Notes:
git
2019-12-13 20:47:33 +09:00
2 changed files with 52 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue