summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 15:03:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 15:03:18 +0000
commit58a93ce44169f20c6e9c104a26c99d51768c2eb7 (patch)
tree01e4bf7051ec23542f47e3a307792ddea82f9900 /lib
parent232ced73424dd968aa6d3884bae00db1d5ce06b8 (diff)
* lib/rdoc/class_module.rb (RDoc#merge): get rid of stack overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/class_module.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rdoc/class_module.rb b/lib/rdoc/class_module.rb
index c3029bfe9b..321aaee57d 100644
--- a/lib/rdoc/class_module.rb
+++ b/lib/rdoc/class_module.rb
@@ -145,12 +145,13 @@ class RDoc::ClassModule < RDoc::Context
# Merges +class_module+ into this ClassModule
def merge class_module
- if class_module.comment then
+ comment = class_module.comment
+ if comment then
document = parse @comment
- class_module.comment.parts.push(*document.parts)
+ comment.parts.concat(document.parts)
- @comment = class_module.comment
+ @comment = comment
end
class_module.each_attribute do |attr|