[#8787] Literal inconsistency — Calamitas <calamitates@...>
Hi,
Calamitas <calamitates@gmail.com> writes:
On 9/4/06, Christian Neukirchen <chneukirchen@gmail.com> wrote:
[#8794] bignums — Ondrej Bilka <neleai@...>
I want ask how look integration of faster bignums.
[#8798] okay, threading & sandbox r70 -- the latest patch — why the lucky stiff <ruby-core@...>
We have previously talked about getting the sandbox to obey thread switching on
Hi,
[#8802] WEBrick::Cookie support for multiple cookies per set-cookie — Aaron Patterson <aaron_patterson@...>
WEBrick's cookie class has a method for parsing Set-Cookie headers, but
[#8813] ruby-1.8.5 loads fox16.so more than once — <noreply@...>
Bugs item #5701, was opened at 2006-09-08 20:59
[#8815] Segfault in libc strlen, via rb_str_new2 — "Sean E. Russell" <ser@...>
Howdy,
On Sep 8, 2006, at 10:10 PM, Sean E. Russell wrote:
On Saturday 09 September 2006 01:42, Eric Hodel wrote:
On Sep 9, 2006, at 7:16 PM, Sean E. Russell wrote:
On Sunday 10 September 2006 22:57, Eric Hodel wrote:
[#8826] OptionParser < Hash — "greg weber" <eegreg@...>
Hi,
[#8828] REXML fails to parse UTF-16 XML. — <noreply@...>
Bugs item #5711, was opened at 2006-09-11 01:25
Hi,
[#8861] new changes in strings+symbols — Mathieu Bouchard <matju@...>
On Wed, 13 Sep 2006, matz wrote:
[#8864] documentation of ruby internals — Deni George <denigeorge@...>
Hello
On Thursday 14 September 2006 11:30, Deni George wrote:
[#8885] numeric.c fails to build on 64-bit platforms (Fedora Core 5 x86_64 gcc 4.1.1) — <noreply@...>
Patches item #5774, was opened at 2006-09-16 12:19
Hi,
[#8897] Ruby's 'etc' module cannot handle the UID of OS X 'nobody' properly — <noreply@...>
Bugs item #5822, was opened at 2006-09-20 11:13
Hi,
[#8904] patch bignums — Ondrej Bilka <neleai@...>
I am so far with implementing faster bignums:
[#8920] rdoc capture output (help message) — "greg weber" <eegreg@...>
Hi,
The simplest command line would be
greg weber wrote:
It looks like you could seperate this out into a rake task, but then
On Sep 29, 2006, at 5:52 AM, greg weber wrote:
[#8929] Re: RDoc patch, possible bug in socket.c for TCPSocket.new — gwtmp01@...
[#8948] socket (and many others) not building on osx? — Ryan Davis <ryand-ruby@...>
I'm stumped. A brand new clean build doesn't build socket.
[#8954] The %? .. ? Operator — James Edward Gray II <james@...>
I'm needing to know the full list of characters that can (or cannot)
On Sep 29, 2006, at 9:56 AM, James Edward Gray II wrote:
Re: [PATCH] rdoc capture output (help message)
there was a bug in original implementation. attached is a new rdoc.rb diff Greg Weber
Attachments (1)
--- /desktop/rdoc.rb 2006-09-26 21:51:35.609375000 -0500
+++ ./rdoc.rb 2006-09-26 21:44:02.546875000 -0500
@@ -203,6 +203,70 @@
normalized_file_list(options, Dir.glob(File.join(dir, "*")), false, options.exclude)
end
+ # --capture-output option: capture resulting output from script execution
+ # to run rdoc in a directory and capture the help infromation for only files containing 'optparse'
+ # and place that infromation below the current rdoc header, use the following:
+ # rdoc -C arg=--help,header=Usage,pos=bot,trigger="(require|load).*optparse"
+ def capture_output(filename, content, options)
+
+ # determine the start and finish of the rdoc header documentation
+ # then we can place the help_doc before, after, or overriding it
+ rdoc_start, rdoc_finish = nil, nil
+ content = content.to_a
+ return content.to_s unless content.each_with_index do |line, index|
+ next if index == 0 and line =~ /^#\!/
+
+ if rdoc_start.nil?
+ break true unless line =~ /(^#)|(^\s*$)/
+ rdoc_start = index if $1
+
+ elsif rdoc_finish.nil?
+ if line =~ /^[^#]/
+ rdoc_finish = index
+ break true unless options[:trigger]
+ end
+
+ elsif line =~ options[:trigger]
+ break true
+ end
+ end
+
+ # in this case there is no rdoc header
+ if rdoc_start.nil?
+ rdoc_start = rdoc_finish = 0
+ end
+
+ # hack to fix a bug that I don't know why it occurs:
+ # there is no special rdoc formatting applied if there are spaces between the '#' and the text.
+ # remove one white space character
+ content[rdoc_start...rdoc_finish] = content[rdoc_start...rdoc_finish].map{|line| line.sub(/^#\s/, '#') }
+
+ # command to capture output from file. Do not chomp the output.
+ command = "ruby #{filename} #{ options[:args] ? options[:args].join(' ') : '' }"
+
+ # remove one space for previously mentioned bug
+ # find given headers and insert '==' to make them appear as headers
+ if options[:headers]
+ headers = options[:headers]
+
+ help_doc = %x{ #{command} }.map do |line|
+ headers.reject! do |header|
+ line = "==#$1" << ($` or '') << "\n" if line =~ /\s*(#{header})/
+ end
+
+ line.sub(/^\s?/, '#')
+ end
+
+ else
+ help_doc = %x{ #{command} }.map{ |line| line.sub(/^\s?/, '#') }
+ end
+
+ case options[:position] # default is :bottom
+ when :top then (content[0...rdoc_start] + help_doc + content[rdoc_start..-1]).to_s
+ when :override then (help_doc + content[rdoc_finish..-1]).to_s
+ else (content[0...rdoc_finish] + help_doc + content[rdoc_finish..-1]).to_s
+ end
+ end
# Parse each file on the command line, recursively entering
# directories
@@ -221,6 +285,8 @@
content = File.open(fn, "r") {|f| f.read}
+ content = capture_output(fn, content, options.capture_output) if options.capture_output
+
top_level = TopLevel.new(fn)
parser = ParserFactory.parser_for(top_level, fn, content, options, @stats)
file_info << parser.scan