зеркало из https://github.com/github/ruby.git
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:
Родитель
7a635a7d12
Коммит
03cde6c805
|
@ -131,7 +131,7 @@ class RDoc::Markup::ToMarkdown < RDoc::Markup::ToRdoc
|
|||
@res << part
|
||||
end
|
||||
|
||||
@res << "\n" unless @res =~ /\n\z/
|
||||
@res << "\n"
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
@ -234,7 +234,7 @@ class RDoc::Markup::ToRdoc < RDoc::Markup::Formatter
|
|||
@res << part
|
||||
end
|
||||
|
||||
@res << "\n" unless @res =~ /\n\z/
|
||||
@res << "\n"
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Загрузка…
Ссылка в новой задаче