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

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

Open
dgutov opened this issue Mar 16, 2024 · 0 comments
Open

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

dgutov opened this issue Mar 16, 2024 · 0 comments

Comments

@dgutov
Copy link
Contributor

dgutov commented Mar 16, 2024

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.

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