mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
fix visibility bug on 1.9
This commit is contained in:
parent
79382dca54
commit
ecaed39da4
1 changed files with 3 additions and 3 deletions
|
@ -238,11 +238,11 @@ class Pry
|
|||
# @return [Symbol] The visibility of the method. May be `:public`,
|
||||
# `:protected`, or `:private`.
|
||||
def visibility
|
||||
@visibility ||= if owner.public_instance_methods.include?(name)
|
||||
@visibility ||= if owner.public_instance_methods.any? { |m| m.to_s == name }
|
||||
:public
|
||||
elsif owner.protected_instance_methods.include?(name)
|
||||
elsif owner.protected_instance_methods.any? { |m| m.to_s == name }
|
||||
:protected
|
||||
elsif owner.private_instance_methods.include?(name)
|
||||
elsif owner.private_instance_methods..any? { |m| m.to_s == name }
|
||||
:private
|
||||
else
|
||||
:none
|
||||
|
|
Loading…
Add table
Reference in a new issue