Skip to content
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 Array : no docs found #66

Open
LunarLanding opened this issue Apr 22, 2017 · 0 comments
Open

show-doc Array : no docs found #66

LunarLanding opened this issue Apr 22, 2017 · 0 comments

Comments

@LunarLanding
Copy link

What I do ( in pry ): show-doc Array
What I expected: the documentation that Yard has for Array.
What happens: no docs found.
What I found about this issue: pry/pry#960
Examples:

[1] pry(main)> ? Array
Error: No docs found for: Array
[2] pry(main)> ? ::Array
Error: No docs found for: ::Array
[3] pry(main)> ? :Array
Error: Couldn't locate a definition for :Array!
[4] pry(main)> ? ::Array
Error: No docs found for: ::Array
[5] pry(main)> ? Kernel::Array
Error: Cannot locate this method: Array. (source_location returns nil)
[6] pry(main)> ? Kernel#Array

From: object.c (C Method):
Owner: Kernel
Visibility: private
Signature: Array(arg1)
Number of lines: 5

Returns arg as an Array.

First tries to call to_ary on arg, then to_a.

   Array(1..5)   #=> [1, 2, 3, 4, 5]
[7] pry(main)> exit
MABook Pro:dev miguel$ pry
[1] pry(main)> ? Array
Error: No docs found for: Array
[2] pry(main)> ? ::Array
Error: No docs found for: ::Array
[3] pry(main)> ? Kernel#Array

From: object.c (C Method):
Owner: Kernel
Visibility: private
Signature: Array(arg1)
Number of lines: 5

Returns arg as an Array.

First tries to call to_ary on arg, then to_a.

   Array(1..5)   #=> [1, 2, 3, 4, 5]
[4] pry(main)> YARD::Registry.at("Array").docstring
=> "Arrays are ordered, integer-indexed collections of any object.\n\nArray indexing starts at 0, as in C or Java.  A negative index is assumed\nto be relative to the end of the array---that is, an index of -1 [...]

Ruby 2.3.0
Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    coderay (1.1.1)
    gist (4.5.0)
    method_source (0.8.2)
    pry (0.10.4)
      coderay (~> 1.1.0)
      method_source (~> 0.8.1)
      slop (~> 3.4)
    pry-doc (0.10.0)
      pry (~> 0.9)
      yard (~> 0.9)
    slop (3.6.0)
    yard (0.9.8)

PLATFORMS
  ruby

DEPENDENCIES
  gist
  pry
  pry-doc

BUNDLED WITH
   1.14.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant