зеркало из https://github.com/github/ruby.git
Fix problem with private alias to public method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
2c87fffec4
Коммит
e9a7fd1c92
|
@ -1,3 +1,9 @@
|
||||||
|
Wed Dec 31 11:17:37 2003 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
|
* lib/rdoc/generators/html_generator.rb: Fix problem when
|
||||||
|
a public method was aliased, but the alias is then
|
||||||
|
made private, and hence doesn't appear in RDoc output.
|
||||||
|
|
||||||
Wed Dec 31 01:33:05 2003 Dave Thomas <dave@pragprog.com>
|
Wed Dec 31 01:33:05 2003 Dave Thomas <dave@pragprog.com>
|
||||||
|
|
||||||
* array.c, error.c, eval.c, io.c, prec.c, range.c, re.c,
|
* array.c, error.c, eval.c, io.c, prec.c, range.c, re.c,
|
||||||
|
|
|
@ -412,14 +412,18 @@ module Generators
|
||||||
row["aref"] = m.aref
|
row["aref"] = m.aref
|
||||||
row["visibility"] = m.visibility.to_s
|
row["visibility"] = m.visibility.to_s
|
||||||
|
|
||||||
unless m.aliases.empty?
|
alias_names = []
|
||||||
row["aka"] = m.aliases.map do |other|
|
m.aliases.each do |other|
|
||||||
{
|
if other.viewer # won't be if the alias is private
|
||||||
|
alias_names << {
|
||||||
'name' => other.name,
|
'name' => other.name,
|
||||||
'aref' => other.viewer.as_href(path)
|
'aref' => other.viewer.as_href(path)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
unless alias_names.empty?
|
||||||
|
row["aka"] = alias_names
|
||||||
|
end
|
||||||
|
|
||||||
if @options.inline_source
|
if @options.inline_source
|
||||||
code = m.source_code
|
code = m.source_code
|
||||||
|
|
Загрузка…
Ссылка в новой задаче