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

(wip)Update rubies in travis.yml #96

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions .travis.yml
Expand Up @@ -2,12 +2,10 @@ before_install:
- gem update bundler

rvm:
- 2.0.0
- 2.1.10
- 2.2.9
- 2.3.6
- 2.4.3
- 2.5.0
- 2.4.9
- 2.5.7
- 2.6.5
- 2.7.0

script:
- bundle exec rake spec
Expand Down
8 changes: 7 additions & 1 deletion lib/pry-doc/pry_ext/method_info.rb
Expand Up @@ -115,7 +115,7 @@ def find_gem_dir(meth)
host_source_location, _ = WrappedModule.new(host).source_location
break if host_source_location != nil
return unless host.name
host = eval(host.namespace_name)
host = eval(namespace_name(host))
end while host

# We want to exclude all source_locations that aren't gems (i.e
Expand Down Expand Up @@ -186,6 +186,12 @@ def cache(meth)
YARD.parse(file)
end
end

private

def namespace_name(host)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module#namespace_name is removed lsegal/yard#1229. So, I implement pry-doc as private method.

host.name.split("::")[0..-2].join("::")
end
end
end
end