[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>

Howdy,

12 messages 2006/09/09
[#8817] Re: Segfault in libc strlen, via rb_str_new2 — Eric Hodel <drbrain@...7.net> 2006/09/09

On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:

[PATCH] rdoc with optparse

From: "greg weber" <eegreg@...>
Date: 2006-09-11 11:19:03 UTC
List: ruby-core #8838
This is a patch to allow rdoc to read the help message from optparse,
and place it above, below, or overriding the rdoc header.  I don't
understand the rdoc code-  I imagine there is probably a way to re-use
rdoc code for this feature.  The help message shows up well formatted,
but a the regular rdoc header is not formatted correctly.  I don't
know why this is, perhaps someone could enlighten me.

The basic idea is to add a command line argument like --optparse, or
--option=help to rdoc,
which will create documentation by capturing the program's response to --help:
    help_doc = %x{ruby #{fn} --help}.map{ |line| '#' << line }

The patch is against rdoc.rb version 1.1.2.9
Greg Weber

Attachments (1)

rdoc.rb (9.06 KB, application/x-ruby)

In This Thread

Prev Next