From 0ec91a46acab4a17c3cb8db98c4f8086b731c9a4 Mon Sep 17 00:00:00 2001 From: mame Date: Sat, 4 Nov 2017 13:05:05 +0000 Subject: [PATCH] test/ruby/test_io.rb (test_write_no_garbage): Add detailed message I saw this test failed once. There is no problem if `before > after` but we cannot check it. To allow diagnosis in future, the detailed message is added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index a12cda6277..3ffc7281df 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3656,7 +3656,7 @@ __END__ s = w.syswrite(buf) after = ObjectSpace.count_objects(res)[:T_STRING] assert_equal before, after, - 'no strings left over after write [ruby-core:78898] [Bug #13085]' + "no strings left over after write [ruby-core:78898] [Bug #13085]: #{ before } strings before write -> #{ after } strings after write" assert_not_predicate buf, :frozen?, 'no inadvertent freeze' assert_equal buf.bytesize, n, 'IO#write wrote expected size' assert_equal s, n, 'IO#syswrite wrote expected size'