summaryrefslogtreecommitdiff
path: root/lib/pry
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pry')
-rw-r--r--lib/pry/helpers/platform.rb2
-rw-r--r--lib/pry/method/weird_method_locator.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/pry/helpers/platform.rb b/lib/pry/helpers/platform.rb
index b04fa3e4..3af4d3f7 100644
--- a/lib/pry/helpers/platform.rb
+++ b/lib/pry/helpers/platform.rb
@@ -28,7 +28,7 @@ class Pry
def self.windows_ansi?
return false unless windows?
- !!(defined?(Win32::Console) || Pry::Env['ANSICON'] || mri_2?)
+ !!(defined?(Win32::Console) || Pry::Env['ANSICON'] || mri?)
end
# @return [Boolean]
diff --git a/lib/pry/method/weird_method_locator.rb b/lib/pry/method/weird_method_locator.rb
index e4f58c8f..85614aec 100644
--- a/lib/pry/method/weird_method_locator.rb
+++ b/lib/pry/method/weird_method_locator.rb
@@ -158,7 +158,7 @@ class Pry
alias_name = all_methods_for(target_self).find do |v|
location = target_self.method(v).source_location
- expanded_source_location(location) == renamed_method_source_location
+ location && expanded_source_location(location) == renamed_method_source_location
end
alias_name && Pry::Method(target_self.method(alias_name))