summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-31 02:21:07 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-31 02:21:07 +0000
commitb4bcf084a5bdf4a183d85a7b5eab72f7ada7d83b (patch)
tree45af49e4e937263e71676d96ab697457bba08a79
parent73531183b4c3138b42e7e6c81bc1c8bd97fbb603 (diff)
downloadruby-b4bcf084a5bdf4a183d85a7b5eab72f7ada7d83b.tar.gz
ruby-b4bcf084a5bdf4a183d85a7b5eab72f7ada7d83b.tar.xz
ruby-b4bcf084a5bdf4a183d85a7b5eab72f7ada7d83b.zip
Fix problem with private alias to public method
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/rdoc/generators/html_generator.rb10
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c5fb1a2af..1e2231e6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* array.c, error.c, eval.c, io.c, prec.c, range.c, re.c,
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb
index c5a12eee3..b5e8f24e4 100644
--- a/lib/rdoc/generators/html_generator.rb
+++ b/lib/rdoc/generators/html_generator.rb
@@ -412,14 +412,18 @@ module Generators
row["aref"] = m.aref
row["visibility"] = m.visibility.to_s
- unless m.aliases.empty?
- row["aka"] = m.aliases.map do |other|
- {
+ alias_names = []
+ m.aliases.each do |other|
+ if other.viewer # won't be if the alias is private
+ alias_names << {
'name' => other.name,
'aref' => other.viewer.as_href(path)
}
end
end
+ unless alias_names.empty?
+ row["aka"] = alias_names
+ end
if @options.inline_source
code = m.source_code