[#4522] Undefined Errno::EPROTO and the like raises NameError — "Florian Frank" <flori@...>
Hi,
[#4533] giving acces readline to rl_line_buffer — "Cs. Henk" <csaba-ml@...>
Hi!
[#4548] Ruby 1.8.2 array of hash entries functions incorrectly — noreply@...
Bugs item #1613, was opened at 2005-03-09 19:49
[#4561] rb_reg_quote weirdness — Nikolai Weibull <mailing-lists.ruby-core@...>
(Two weirdnesses in one day.)
Hi,
[#4567] Immutable Ropes — Nikolai Weibull <mailing-lists.ruby-core@...>
Note how I didn't write "Immutable Strings" in the subject.
[#4575] Allowing "?" in struct members — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#4587] 0**0==1? — Bertram Scharpf <lists@...>
Hi,
[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>
I'm really sorry if this isn't the place to talk about this. I've
Daniel Amelang wrote:
Hi --
On Monday 21 March 2005 16:17, David A. Black wrote:
Hi --
Hey David, I think that we've had some misunderstandings due to
Hi --
On Wednesday 30 March 2005 20:55, David A. Black wrote:
On Sunday 20 March 2005 21:31, Daniel Amelang wrote:
[#4601] Re: New block syntax — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
[#4611] want_object? - possible? — "Berger, Daniel" <Daniel.Berger@...>
Hi all,
[#4619] Re: want_object? - possible? — Daniel Berger <djberg96@...>
--- nobu.nokada@softhome.net wrote:
Hi --
On 3/24/05, David A. Black <dblack@wobblini.net> wrote:
Hi --
On 4/14/05, David A. Black <dblack@wobblini.net> wrote:
On 14 Apr 2005, at 22:20, Mark Hubbart wrote:
On 4/15/05, Eric Hodel <drbrain@segment7.net> wrote:
[#4622] tempfile.rb — Tilman Sauerbeck <tilman@...>
Hi,
[#4648] about REXML::Encoding — speakillof <speakillof@...>
Hi.
On Thursday 31 March 2005 09:44, speakillof wrote:
Hi.
I've tested, applied, and committed your Encoding patch, Nobu.
Hi,
[PATCH] RDoc - :nodoc: and macro in C
Hi,
A patch for rdoc to:
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_body): allow
macros as methods.
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#find_call_seq): allow
:nodoc: modifier in C.
Index: lib/rdoc/parsers/parse_c.rb
===================================================================
RCS file: /home/nakada/cvs/ruby/lib/rdoc/parsers/parse_c.rb,v
retrieving revision 1.27
diff -U2 -p -r1.27 parse_c.rb
--- lib/rdoc/parsers/parse_c.rb 4 Mar 2005 10:40:09 -0000 1.27
+++ lib/rdoc/parsers/parse_c.rb 15 Mar 2005 15:13:20 -0000
@@ -507,5 +507,5 @@ module RDoc
if source_file
- file_name = File.join(@file_dir, source_file)
+ file_name = File.join(@file_dir, source_file)
body = (@@known_bodies[source_file] ||= File.read(file_name))
else
@@ -520,9 +520,9 @@ 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}
- \s*(\(.*?\)).*?^}xm
-
- comment, params = $1, $3
+ def find_body(meth_name, meth_obj, body, quiet = false)
+ case body
+ when %r{((?>/\*.*?\*/\s*))(?:static\s+)?VALUE\s+#{meth_name}
+ \s*(\(.*?\)).*?^}xm
+ comment, params = $1, $2
body_text = $&
@@ -544,5 +544,5 @@ module RDoc
comment = override_comment if override_comment
- find_call_seq(comment, meth_obj) if comment
+ find_modifiers(comment, meth_obj) if comment
# meth_obj.params = params
@@ -550,5 +550,14 @@ module RDoc
meth_obj.add_token(RubyToken::Token.new(1,1).set_text(body_text))
meth_obj.comment = mangle_comment(comment)
-
+ when %r{((?>/\*.*?\*/\s*))^\s*\#\s*define\s+#{meth_name}\s+(\w+)}m
+ comment = $1
+ find_body($2, meth_obj, body, true)
+ find_modifiers(comment, meth_obj)
+ meth_obj.comment = mangle_comment(comment) + meth_obj.comment
+ when %r{^\s*\#\s*define\s+#{meth_name}\s+(\w+)}m
+ unless find_body($1, meth_obj, body, true)
+ $stderr.puts "No definition for #{meth_name}" unless quiet
+ return false
+ end
else
@@ -557,10 +566,12 @@ module RDoc
if comment
- find_call_seq(comment, meth_obj)
+ find_modifiers(comment, meth_obj)
meth_obj.comment = mangle_comment(comment)
else
- $stderr.puts "No definition for #{meth_name}"
+ $stderr.puts "No definition for #{meth_name}" unless quiet
+ return false
end
end
+ true
end
@@ -573,6 +584,11 @@ module RDoc
# Array.new(10)
# use it for the parameters
- def find_call_seq(comment, meth_obj)
- if comment.sub!(/call-seq:(.*?)^\s*\*?\s*$/m, '')
+ def find_modifiers(comment, meth_obj)
+ if comment.sub!(/:nodoc:\s*^\s*\*?\s*$/m, '') or
+ comment.sub!(/\A\/\*\s*:nodoc:\s*\*\/\Z/, '')
+ meth_obj.document_self = false
+ end
+ if comment.sub!(/call-seq:(.*?)^\s*\*?\s*$/m, '') or
+ comment.sub!(/\A\/\*\s*call-seq:(.*?)\*\/\Z/, '')
seq = $1
seq.gsub!(/^\s*\*\s*/, '')
--
Nobu Nakada