diff options
| author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-02 02:59:17 +0000 |
|---|---|---|
| committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-08-02 02:59:17 +0000 |
| commit | c27daf6bca98e5fd58c2153bcae0e1ad5f85a865 (patch) | |
| tree | 0a085b06384fb0af81c8cec53b1751107fe4dc39 /lib | |
| parent | 3e1ff53437014d05842041bdb7747fb0665a1a42 (diff) | |
| download | ruby-c27daf6bca98e5fd58c2153bcae0e1ad5f85a865.tar.gz ruby-c27daf6bca98e5fd58c2153bcae0e1ad5f85a865.tar.xz ruby-c27daf6bca98e5fd58c2153bcae0e1ad5f85a865.zip | |
Bugfix: looping on some toplevel symbols. Added SWIG support
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rdoc/code_objects.rb | 2 | ||||
| -rw-r--r-- | lib/rdoc/parsers/parse_c.rb | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/rdoc/code_objects.rb b/lib/rdoc/code_objects.rb index 9bacab8f6..82872db14 100644 --- a/lib/rdoc/code_objects.rb +++ b/lib/rdoc/code_objects.rb @@ -325,7 +325,7 @@ module RDoc result = nil case symbol when /^::(.*)/ - result = toplevel.find_symbol(symbol) + result = toplevel.find_symbol($1) when /::/ modules = symbol.split(/::/) unless modules.empty? diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb index 31c110640..c42fbb2e1 100644 --- a/lib/rdoc/parsers/parse_c.rb +++ b/lib/rdoc/parsers/parse_c.rb @@ -254,7 +254,8 @@ module RDoc handle_class_module(var_name, "module", class_name, nil, nil) end - @body.scan(/(\w+)\s* = \s*rb_define_class + # The '.' lets us handle SWIG-generated files + @body.scan(/([\w\.]+)\s* = \s*rb_define_class \( \s*"(\w+)", \s*(\w+)\s* @@ -280,7 +281,7 @@ module RDoc handle_class_module(var_name, "module", class_name, nil, in_module) end - @body.scan(/(\w+)\s* = \s*rb_define_class_under + @body.scan(/([\w\.]+)\s* = \s*rb_define_class_under \( \s*(\w+), \s*"(\w+)", @@ -304,7 +305,7 @@ module RDoc module_function | private_method ) - \(\s*(\w+), + \(\s*([\w\.]+), \s*"([^"]+)", \s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?, \s*(-?\w+)\s*\) |
