lib/rdoc/markup/: Remove wrong call to =~ against Array

`@res` is an Array, so `@res =~ /\n\z/` calls `Object#=~` which always
returns nil.
I guess it should be `@res.last =~ /\n\z/`, but the change causes test
failures.

This bug was found during work for removal of `Object#=~`.
[Feature #15231]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2018-11-26 05:32:50 +00:00
parent 7a635a7d12
commit 03cde6c805
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class RDoc::Markup::ToMarkdown < RDoc::Markup::ToRdoc
@res << part
end
@res << "\n" unless @res =~ /\n\z/
@res << "\n"
end
##

View File

@ -234,7 +234,7 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
@res << part
end
@res << "\n" unless @res =~ /\n\z/
@res << "\n"
end
##