summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKyrylo Silin <silin@kyrylo.org>2019-03-24 18:24:24 +0200
committerKyrylo Silin <silin@kyrylo.org>2019-03-24 18:49:37 +0200
commit6a397001a32f70d74832da3452a2269663dbc11b (patch)
treea187b1325e3e1e27adf8cf9ae48def00ceecefae /lib
parent596cc50fbc170d7daffe0691d334dd3bf06af8ad (diff)
downloadpry-6a397001a32f70d74832da3452a2269663dbc11b.tar.gz
rubocop: fix the Naming/AccessorMethodName cop
Diffstat (limited to 'lib')
-rw-r--r--lib/pry/method.rb4
-rw-r--r--lib/pry/method/weird_method_locator.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/pry/method.rb b/lib/pry/method.rb
index 891fe57a..252d610b 100644
--- a/lib/pry/method.rb
+++ b/lib/pry/method.rb
@@ -94,7 +94,7 @@ class Pry
end
if WeirdMethodLocator.weird_method?(method, binding)
- WeirdMethodLocator.new(method, binding).get_method || method
+ WeirdMethodLocator.new(method, binding).find_method || method
else
method
end
@@ -475,7 +475,7 @@ class Pry
# @return [Boolean]
def ==(other)
- return @method == other if other.is_a?(Pry::Method)
+ return other == @method if other.is_a?(Pry::Method)
@method == other
end
diff --git a/lib/pry/method/weird_method_locator.rb b/lib/pry/method/weird_method_locator.rb
index 0aa1c626..d559f36f 100644
--- a/lib/pry/method/weird_method_locator.rb
+++ b/lib/pry/method/weird_method_locator.rb
@@ -57,7 +57,7 @@ class Pry
# @return [Pry::Method, nil] The Pry::Method that matches the
# given binding.
- def get_method
+ def find_method
find_method_in_superclass || find_renamed_method
end
@@ -65,7 +65,7 @@ class Pry
# This usually happens when the method captured by the Binding
# has been subsequently deleted.
def lost_method?
- !!(get_method.nil? && renamed_method_source_location)
+ !!(find_method.nil? && renamed_method_source_location)
end
private