aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/class_module.rb2
-rw-r--r--lib/rdoc/comment.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/rdoc/class_module.rb b/lib/rdoc/class_module.rb
index fdd56e236b..7609080fbf 100644
--- a/lib/rdoc/class_module.rb
+++ b/lib/rdoc/class_module.rb
@@ -210,7 +210,7 @@ class RDoc::ClassModule < RDoc::Context
normalize_comment comment
end
- comment = "#{@comment}\n---\n#{comment}" unless @comment.empty?
+ comment = "#{@comment.to_s}\n---\n#{comment.to_s}" unless @comment.empty?
super comment
end
diff --git a/lib/rdoc/comment.rb b/lib/rdoc/comment.rb
index 134f6440a0..0f643c45b9 100644
--- a/lib/rdoc/comment.rb
+++ b/lib/rdoc/comment.rb
@@ -34,6 +34,11 @@ class RDoc::Comment
attr_reader :text
##
+ # Alias for text
+
+ alias to_s text
+
+ ##
# Overrides the content returned by #parse. Use when there is no #text
# source for this comment