summaryrefslogtreecommitdiff
path: root/lib/rdoc
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-27 23:03:20 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-08-27 23:03:20 +0000
commit6e83a71d3bb260cf2e02cd88e6a6f72fab50e910 (patch)
tree64b415ba0470268be7710e7362c65a54c8d7cdb6 /lib/rdoc
parent92b0eb1f42352ccb0ef64c294427a0c7308f9c08 (diff)
Include attribution
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r--lib/rdoc/parsers/parse_c.rb4
-rw-r--r--lib/rdoc/parsers/parse_rb.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index f04d37cb9f..3185da7719 100644
--- a/lib/rdoc/parsers/parse_c.rb
+++ b/lib/rdoc/parsers/parse_c.rb
@@ -169,6 +169,7 @@ module RDoc
extend ParserFactory
parse_files_matching(/\.(c|cc|cpp|CC)$/)
+ @@enclosure_classes = {}
@@known_bodies = {}
# prepare to parse a C file
@@ -230,7 +231,7 @@ module RDoc
parent_name = @known_classes[parent] || parent
if in_module
- enclosure = @classes[in_module]
+ enclosure = @classes[in_module] || @@enclosure_classes[in_module]
unless enclosure
if enclosure = @known_classes[in_module]
handle_class_module(in_module, (/^rb_m/ =~ in_module ? "module" : "class"),
@@ -258,6 +259,7 @@ module RDoc
find_class_comment(cm.full_name, cm)
@classes[var_name] = cm
+ @@enclosure_classes[var_name] = cm
@known_classes[var_name] = cm.full_name
end
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 0186b023a1..8fe9da6ae8 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1488,7 +1488,7 @@ module RDoc
obj.pop_token
end if @token_listeners
else
- warn("':' not followed by identified or operator")
+ warn("':' not followed by identifier or operator")
tk = tk1
end
end