summaryrefslogtreecommitdiff
path: root/test/ruby/test_exception.rb
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2019-10-04 15:41:13 -0700
committerJeremy Evans <[email protected]>2020-01-02 18:40:45 -0800
commitff96565686c05919bcae3ea77831879e95f67457 (patch)
treee04eaa5afdaaa942ccfef86648ebfb8a632e8c33 /test/ruby/test_exception.rb
parentbeae6cbf0fd8b6619e5212552de98022d4c4d4d4 (diff)
Update tests for full keyword argument separation
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2794
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r--test/ruby/test_exception.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index c0ab23a18e..086f250a3b 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -945,8 +945,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
assert_raise(ArgumentError) {warn("test warning", uplevel: -1)}
assert_in_out_err(["-e", "warn 'ok', uplevel: 1"], '', [], /warning:/)
warning = capture_warning_warn {warn("test warning", {uplevel: 0})}
- assert_equal("#{__FILE__}:#{__LINE__-1}: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call\n", warning[0])
- assert_match(/warning: The called method (?:`.*' )?is defined here|warning: test warning/, warning[1])
+ assert_match(/test warning.*{:uplevel=>0}/m, warning[0])
warning = capture_warning_warn {warn("test warning", **{uplevel: 0})}
assert_equal("#{__FILE__}:#{__LINE__-1}: warning: test warning\n", warning[0])
warning = capture_warning_warn {warn("test warning", {uplevel: 0}, **{})}