Skip to content
Browse files

Add error raise if module_object method returns nil

  • Loading branch information...
1 parent 0cc176c commit b791d230bb61b7004e9c30edb9a1c9b4063f2a4b @TreyLawrence TreyLawrence committed Jul 22, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/pry/default_commands/introspection.rb
View
2 lib/pry/default_commands/introspection.rb
@@ -155,6 +155,7 @@ def process_sourcable_object
end
def process_module
+ raise Pry::CommandError, "No documentation found." if module_object.nil? || module_object.doc.nil? || module_object.doc.empty?
if opts.present?(:all)
all_modules
else
@@ -334,6 +335,7 @@ def process_method
end
def process_module
+ raise Pry::CommandError, "No documentation found." if module_object.nil? || module_object.source.nil?
if opts.present?(:all)
all_modules
else

0 comments on commit b791d23

Please sign in to comment.
Something went wrong with that request. Please try again.