Merge pull request #1071 from yui-knk/refactor-method

Refactor lib/pry/method.rb(Pry::Method.all_from_obj).
This commit is contained in:
Kyrylo Silin 2013-12-27 07:40:43 -08:00
commit 287f6b4670
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ class Pry
# @param [Boolean] include_super Whether to include methods from ancestors.
# @return [Array[Pry::Method]]
def all_from_obj(obj, include_super=true)
all_from_class(class << obj; self; end, include_super)
all_from_class(singleton_class_of(obj), include_super)
end
# Get every `Class` and `Module`, in order, that will be checked when looking