[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 [...]
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
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:
Ruby 2.3.0
Gemfile.lock: