1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

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

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