Skip to content

Doc and source for Kernel#is_a? aren't shown with pry-doc > 0.8.0 #131

@dgutov

Description

@dgutov

I've been upgrading some gems on CI, and this difference sticks out (I have it in a spec):

Test scenario (inside irb repl):

gem 'pry-doc', '0.8.0'
gem 'pry', '0.10.0'
require 'pry'
pry
? Kernel#is_a? # => Returns true if if class is the class of ...
$ Kernel#is_a? # => ... VALUE\nrb_obj_is_kind_of ...
gem 'pry-doc', '0.9.0'
gem 'pry', '0.10.0'
require 'pry'
pry
? Kernel#is_a? # => Error: Cannot locate this method: is_a?. (source_location returns nil)
$ Kernel#is_a? # same 

You need to install some pretty old Ruby to try these versions. I tested both of the above with 2.2.0 and 1.9.3.

And all newer versions of pry-doc have this problem.

The same functionality stays working for Kernel#class and Kernel#method, so I'm not sure where to look. The code around rb_obj_is_kind_of's definition didn't change for decades.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions