IHelp: a bugreport and an extension (mocked-up repost)

Hi!

A couple of days ago I posted this stuff to comp.lang.ruby, but it
didn't hit the ml since then, so I repost it. (As even Ilmari didn't
react to the original posts, I consider them lost.)

* Bugreport:

Array.help just throws the following at you:

---------------------------------------------- Class: TSortArray < Array
     (no description...)

···

------------------------------------------------------------------------

* Extension:

ihelp-dump.rb, you find it at http://www.creo.hu/~csaba/ruby/ with
generated rdoc.

It enables you to dump rendered docs to any object which features #<<.

Also comes with the handy methods for resetting the formatter engine and
to output all docs belonging to a given class/module.

Csaba

Hi,

Hi!

A couple of days ago I posted this stuff to comp.lang.ruby, but it
didn't hit the ml since then, so I repost it. (As even Ilmari didn't
react to the original posts, I consider them lost.)

I hear the news-ml gateway has been less than cooperative lately.

* Bugreport:

Array.help just throws the following at you:

---------------------------------------------- Class: TSortArray < Array
     (no description...)
------------------------------------------------------------------------

Thanks for the bug report, how to reproduce this?
Particularly: what architecture, loaded libraries?

It's strange though, Array.help really shouldn't go _down_
in the inheritance hierarchy. First time for everything I suppose.

* Extension:

ihelp-dump.rb, you find it at http://www.creo.hu/~csaba/ruby/ with
generated rdoc.

It enables you to dump rendered docs to any object which features #<<.

Also comes with the handy methods for resetting the formatter engine and
to output all docs belonging to a given class/module.

Csaba

Thank you for this aswell, it looked like it might come handy on a quick glance.
I'll look into it more once I wake up...

Ilmari

···

On 4.3.2005, at 00:34, Cs. Henk wrote:
--
66. The regions beyond these places are either difficult of access because of their excessive winters and great cold, or else cannot be sought out because, of some divine influence of the gods.

Thanks for the bug report, how to reproduce this?
Particularly: what architecture, loaded libraries?

Hm, I truly don't know. I have a Gentoo system with ruby-1.8.2.

I just type "env -i ruby -rihelp -e 'Array.help'" at the prompt, and
this happens. "ri Array" works fine. Neither is a problem with the
ruby-cvs ebuild.

Hm, I looked around it, I have a

/usr/share/ri/1.8/system/TSortArray/cdesc-TSortArray.yaml

file which appears to be something that shouldn't be there/ I don't know
how is this generated (I don't have this file either in my 1.9
installations or in an other 1.8.2 installation). I wonder is there
anybody else with such a file around?

It's strange though, Array.help really shouldn't go _down_
in the inheritance hierarchy. First time for everything I suppose.

Apart from that flaw in my installation, this is why it still can
inidcate a bug in IHelp: why does it give priority to this stub subclass
documentation? Add to this that ri doesn't do that...

Here is the content of cdesc-TSortArray.yaml if you want to test the
behaviour of IHelp in the presence of that file:

--- !ruby/object:RI::ClassDescription
attributes: []
class_methods: []
comment:
constants: []
full_name: TSortArray
includes: []
instance_methods: []
name: TSortArray
superclass: Array

>* Extension:
>
>ihelp-dump.rb, you find it at http://www.creo.hu/~csaba/ruby/ with
>generated rdoc.
>
>It enables you to dump rendered docs to any object which features #<<.

(snip)

Thank you for this aswell, it looked like it might come handy on a
quick glance.

Well, in
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/127842
you told me that by your knowledge piping in the output of ri is the
only way to get the rendered text, so I had to find a better way of
doing that, of course :slight_smile:

Csaba

···

On Fri, Mar 04, 2005 at 10:52:15AM +0900, Ilmari Heikkinen wrote: