diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-21 20:34:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-21 20:34:37 +0000 |
commit | c60c0503782d68a1ba8a7b675f6e53713c5b67da (patch) | |
tree | fe09bc820892d93d54204927e7002d9c7b9fc480 /test/ruby/envutil.rb | |
parent | 9150340b9bcbe305c2647a8d6f6f8e754769f3e7 (diff) | |
download | ruby-c60c0503782d68a1ba8a7b675f6e53713c5b67da.tar.gz |
* test/ruby/envutil.rb (assert_warning): show diff.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/envutil.rb')
-rw-r--r-- | test/ruby/envutil.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb index 98b89edd8c..85116fdac0 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 |