mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Improved error message for unlocatable methods.
* explicitly stating that source_location is nil
This commit is contained in:
parent
1a26088670
commit
42fca560e0
1 changed files with 1 additions and 1 deletions
|
@ -411,7 +411,7 @@ class Pry
|
|||
# @raise [CommandError] Raises when the method can't be found or `pry-doc` isn't installed.
|
||||
def pry_doc_info
|
||||
if Pry.config.has_pry_doc
|
||||
Pry::MethodInfo.info_for(@method) or raise CommandError, "Cannot locate this method: #{name}."
|
||||
Pry::MethodInfo.info_for(@method) or raise CommandError, "Cannot locate this method: #{name}. (source_location returns nil)"
|
||||
else
|
||||
raise CommandError, "Cannot locate this method: #{name}. Try `gem install pry-doc` to get access to Ruby Core documentation."
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue