Permalink
Browse files

Use public method to get wrapped element

  • Loading branch information...
1 parent c1fd189 commit 47c12c1f30cf3370a07de047527b6fa870e65d6e @TreyLawrence TreyLawrence committed Jul 23, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 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

0 comments on commit 47c12c1

Please sign in to comment.