Project

General

Profile

Bug #15819

cannot read document of File::NULL with "ri File::NULL"

Added by tad (Tadashi Saito) over 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
[ruby-core:92531]
Tags:

Updated by tad (Tadashi Saito) over 1 year ago

  • ruby -v set to ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]
  • Subject changed from cannot read document of File::NULL with ri File::NULL to cannot read document of File::NULL with "ri File::NULL"

When I type ri File::NULL, got

Nothing known about File::NULL
Did you mean? File::Stat

but

IHMO, it's too difficult to guess proper command.

I did not know if this was a markup mistake or a logic bug in RDoc, so I registered here for the time being.

Updated by shevegen (Robert A. Heiler) over 1 year ago

IHMO, it's too difficult to guess proper command.

Agree - File::NULL works in e. g. irb too and should work for ri. I found rdoc/ri
a bit cumbersome to use API-wise; in one project, that displays rdoc documentation
for methods (a bit similar as what pry does), I use code such as this:

hash = RDoc::RI::Driver.process_args(arguments)
rdoc_driver = RDoc::RI::Driver.new(hash)

To process stuff. if it were up to me I would try to enhance rdoc in general to be
more "friendly" (simpler) API-wise to use for downstream ruby users in general, but
I digress from your issue, sorry.

Updated by jeremyevans0 (Jeremy Evans) 6 months ago

  • Status changed from Open to Closed

ri doesn't show documentation on all constants, only classes and modules. So it is expected that ri File::NULL will not work, just as ri Date::ITALY and ri Integer::GMP_VERSION don't work.

There is a bug here, and that is that File::Constants was documented under File::File::Constants. I've traced this to a typo in rdoc, which I've submitted a pull request to fix: https://github.com/ruby/rdoc/pull/774

Also available in: Atom PDF