Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use public method to get wrapped element

  • Loading branch information...
commit 47c12c1f30cf3370a07de047527b6fa870e65d6e 1 parent c1fd189
@TreyLawrence TreyLawrence authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/pry/default_commands/introspection.rb
View
6 lib/pry/default_commands/introspection.rb
@@ -15,7 +15,7 @@ def module_object
@module_object = WrappedModule.from_str(name, target)
if @module_object
sup = @module_object.ancestors.select do |anc|
- anc.class == @module_object.send(:wrapped).class
+ anc.class == @module_object.wrapped.class
end[opts[:super]]
@module_object = sup ? Pry::WrappedModule(sup) : nil
end
@@ -155,7 +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?
+ raise Pry::CommandError, "No documentation found." if module_object.nil?
if opts.present?(:all)
all_modules
else
@@ -335,7 +335,7 @@ def process_method
end
def process_module
- raise Pry::CommandError, "No documentation found." if module_object.nil? || module_object.source.nil?
+ raise Pry::CommandError, "No documentation found." if module_object.nil?
if opts.present?(:all)
all_modules
else
Please sign in to comment.
Something went wrong with that request. Please try again.