mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Reword keyword arguments warning messages to convey these are deprecation warnings
This commit is contained in:
parent
df6f5c44af
commit
819b604037
14 changed files with 501 additions and 501 deletions
|
@ -1208,7 +1208,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: The last argument is used as keyword parameters; maybe ** should be added to the call\n", warning[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])
|
||||
warning = capture_warning_warn {warn("test warning", **{uplevel: 0})}
|
||||
assert_equal("#{__FILE__}:#{__LINE__-1}: warning: test warning\n", warning[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue