mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add explicit line breaks in method signatures for ri. Fixup some comments in object.c. Support changes comments for "in xxx.c"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ac4ebbf21
commit
16b7b1fb95
5 changed files with 39 additions and 9 deletions
|
@ -261,11 +261,10 @@ module RDoc
|
|||
\s*"([^"]+)",
|
||||
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
|
||||
\s*(-?\w+)\s*\)
|
||||
(?:;\s*//\s+in\s+(\w+?\.[cy]))?
|
||||
(?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))?
|
||||
}xm) do
|
||||
|type, var_name, meth_name, meth_body, param_count, source_file|
|
||||
#"
|
||||
next if meth_name == "initialize_copy"
|
||||
|
||||
# Ignore top-object and weird struct.c dynamic stuff
|
||||
next if var_name == "ruby_top_self"
|
||||
|
@ -282,10 +281,9 @@ module RDoc
|
|||
\s*"([^"]+)",
|
||||
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
|
||||
\s*(-?\w+)\s*\)
|
||||
(?:;\s*//\s+in\s+(\w+?\.[cy]))?
|
||||
(?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))?
|
||||
}xm) do #"
|
||||
|meth_name, meth_body, param_count, source_file|
|
||||
|
||||
handle_method("method", "rb_mKernel", meth_name,
|
||||
meth_body, param_count, source_file)
|
||||
end
|
||||
|
@ -346,7 +344,7 @@ module RDoc
|
|||
|
||||
# Find the C code corresponding to a Ruby method
|
||||
def find_body(meth_name, meth_obj, body)
|
||||
if body =~ %r{((?>/\*.*?\*/\s+))(static\s+)?VALUE\s+#{meth_name}
|
||||
if body =~ %r{((?>/\*.*?\*/\s*))(static\s+)?VALUE\s+#{meth_name}
|
||||
\s*(\(.*?\)).*?^}xm
|
||||
comment, params = $1, $3
|
||||
body_text = $&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue