On May 18, 2011, at 7:56 AM, Benoit Daloze wrote:
>> I don't think I can fix 2) as it's performed by Readline
>=20
> I believed it is not related to Readline, I probably did not make =
myself clear.

I thought you meant the method list shown when you attempt to complete a =
method definition by hitting <Tab> at the Readline prompt.

>>> 2) methods should be a comma separated list in interactive mode
>>> because the current output is very long and verbose and make you =
scroll a lot to see the class description
>>> The separation of the methods depending from which 'gem' it comes is =
really useful and should be kept.
>=20
> When you type 'String' in `ri -i`, you get the class description, then =
a very long list of methods, because they are displayed one by line. I =
remember they were displayed as a comma separated list.
>=20
> I did begin to write about this, here is the idea of it:
>=20
> diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
> @@ -456,9 +456,7 @@
>     out << RDoc::Markup::Heading.new(1, "#{name}:")
>     out << RDoc::Markup::BlankLine.new
>=20
> -    out.push(*methods.map do |method|
> -      RDoc::Markup::Verbatim.new method
> -    end)
> +    out << RDoc::Markup::Paragraph.new(methods.join(', '))

Ah, ok!

How about a comma-separated output when given to a user ($stdout is a =
TTY or rdoc is sending output to a pager) and a newline-separated list =
when output is not given to a user (rdoc blah | grep)?=