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

C

Cs. Henk

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
 
I

Ilmari Heikkinen

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
 
C

Cs. Henk

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
(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 :)

Csaba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top