summaryrefslogtreecommitdiff
path: root/test/ruby/envutil.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r--test/ruby/envutil.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index 98b89edd8c9..85116fdac0f 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -299,10 +299,9 @@ eom
raise res
end
- def assert_warning(pat, message = nil)
+ def assert_warning(pat, msg = nil)
stderr = EnvUtil.verbose_warning { yield }
- message = ' "' + message + '"' if message
- msg = proc {"warning message #{stderr.inspect} is expected to match #{pat.inspect}#{message}"}
+ msg = message(msg) {diff stderr, pat}
assert(pat === stderr, msg)
end