-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show-doc
doens't work for some items but ri
does
#17
Comments
Hello, @Silex! Thanks for reporting this. The problem is that the [11] pry(main)> # Hello, Silex!
[12] pry(main)> def hi
| :hi!
| end
=> :hi
[13] pry(main)> ? hi
From: (pry) @ line 4:
Owner: Object
Visibility: public
Signature: hi()
Number of lines: 1
Hello, Silex!
|
Interesting: [1] pry » YARD::Registry.at("File").docstring
=> ""
[2] pry » YARD::Registry.at("GC").docstring
=> "The <code>GC</code> module provides an interface to Ruby's mark and\nsweep garbage collection mechanism. Some of the underlying methods\nare also available via the <code>ObjectSpace</code> module." Basically it looks like it somewhat finds it (for GC at least) but not when called through |
[2] pry(main)> pry-version
Pry version: 0.9.12.6 on Ruby 2.1.0.
[3] pry(main)> PryDoc::VERSION
=> "0.5.1"
[4] pry(main)> YARD::Registry.at("File").docstring
=> "A <code>File</code> is an abstraction of any file object accessible\nby the program and is closely associated with class <code>IO</code>\n<code>File</code> includes the methods of module\n<code>FileTest</code> as class methods, allowing you to write (for\nexample) <code>File.exist?(\"foo\")</code>.\n\nIn the description of File methods,\n<em>permission bits</em> are a platform-specific\nset of bits that indicate permissions of a file. On Unix-based\nsystems, permissions are viewed as a set of three octets, for the\nowner, the group, and the rest of the world. For each of these\nentities, permissions may be set to read, write, or execute the\nfile:\n\nThe permission bits <code>0644</code> (in octal) would thus be\ninterpreted as read/write for owner, and read-only for group and\nother. Higher-order bits may also be used to indicate the type of\nfile (plain, directory, pipe, socket, and so on) and various other\nspecial features. If the permissions are for a directory, the\nmeaning of the execute bit changes; when set the directory can be\nsearched.\n\nOn non-Posix operating systems, there may be only the ability to\nmake a file read-only or read-write. In this case, the remaining\npermission bits will be synthesized to resemble typical values. For\ninstance, on Windows NT the default permission bits are\n<code>0644</code>, which means read/write for owner, read-only for\nall others. The only change that can be made is to make the file\nread-only, which is reported as <code>0444</code>.\n\nVarious constants for the methods in File can be found in File::Constants." Not sure where to start looking. I haven't investigated this issue much. Sorry. |
And on an older Ruby, too:
( |
Ok I finally got it working like you guys:
There are two things interesting:
|
Could it be an old version of Yard? |
Ok, turns out point 2 is a non issue (me miss-testing stuffs). I use YARD There is only point 1 to worry about, and I just had a good debugging session and I'm pretty close to finding the culprit. The problem is that at https://github.com/pry/pry/blob/master/lib/pry/commands/show_info.rb#L42, Not sure what this really means, but if make it return [EDIT] I was going to create an issue in pry but without pry-doc |
|
Just curious, does |
It doesn't. |
Hello,
Before you complain about
0.4.6
, the same things happen with0.5.1
. Basicallyshow-doc
doens't work for some items butri
works (either at the command line or inside pry):Basically, seems it cannot find
File
orGC
for some weird reason. From the command lineri GC
orri File.exists?
works (as showed in the pry session).How can I debug this? Maybe a path issue?
The text was updated successfully, but these errors were encountered: