diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-31 13:01:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-31 13:01:55 +0000 |
commit | fa2e4a2061e140ce980bd2c8faef0d63bb408100 (patch) | |
tree | 07ad6a1e2089d846866e9ae5d1f71c16bc3f4be6 /test/ruby/test_exception.rb | |
parent | d0afbff3b047755f6a74446185cf08b5618387a0 (diff) | |
download | ruby-fa2e4a2061e140ce980bd2c8faef0d63bb408100.tar.gz |
error.c: negative uplevel
* error.c (rb_warn_m): negative uplevel is not allowed.
[ruby-core:84568] [Bug #14262]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r-- | test/ruby/test_exception.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 76be7f0ac2..212a52f24a 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1007,6 +1007,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| def test_kernel_warn_uplevel warning = capture_warning_warn {warn("test warning", uplevel: 0)} assert_equal("#{__FILE__}:#{__LINE__-1}: warning: test warning\n", warning[0]) + assert_raise(ArgumentError) {warn("test warning", uplevel: -1)} end def test_warning_warn_invalid_argument |