summaryrefslogtreecommitdiff
path: root/test/lib/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-28 06:08:24 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-28 06:08:24 +0000
commit1c58954cece576133e09093e7bdae3630ca4da1c (patch)
tree95c69f8417fb867b72fe7808639abcc607236580 /test/lib/test
parentf28a12734b84997f673cb70268aa19cfebe54584 (diff)
Suppress double dots.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/lib/test')
-rw-r--r--test/lib/test/unit/assertions.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lib/test/unit/assertions.rb b/test/lib/test/unit/assertions.rb
index 435719a..6d255f5 100644
--- a/test/lib/test/unit/assertions.rb
+++ b/test/lib/test/unit/assertions.rb
@@ -450,7 +450,11 @@ EOT
def message(msg = nil, *args, &default) # :nodoc:
if Proc === msg
super(nil, *args) do
- [msg.call, (default.call if default)].compact.reject(&:empty?).join(".\n")
+ ary = [msg.call, (default.call if default)].compact.reject(&:empty?)
+ if 1 < ary.length
+ ary[0...-1] = ary[0...-1].map {|str| str.sub(/(?<!\.)\z/, '.') }
+ end
+ ary.join("\n")
end
else
super