summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Five <therobot.johnny5@gmail.com>2014-04-06 14:25:42 +0200
committerRyan Fitzgerald <rwfitzge@gmail.com>2014-04-27 14:13:44 -0700
commit4e11c93185830f68b25679232ed5dbcf631b8a5f (patch)
tree01fa6d25fb0a9096b581597cbb8f5d57b8936c7a
parent7be17e5d32e1fa7a3da9fc8c3def4c9d9c05d978 (diff)
downloadpry-4e11c93185830f68b25679232ed5dbcf631b8a5f.tar.gz
fully qualify constant name. closes #1193
-rw-r--r--lib/pry/input_completer.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/pry/input_completer.rb b/lib/pry/input_completer.rb
index be564841..74a249f9 100644
--- a/lib/pry/input_completer.rb
+++ b/lib/pry/input_completer.rb
@@ -112,7 +112,7 @@ class Pry::InputCompleter
begin
candidates = eval("#{receiver}.constants.collect(&:to_s)", bind)
candidates |= eval("#{receiver}.methods.collect(&:to_s)", bind)
- rescue RescuableException
+ rescue Pry::RescuableException
candidates = []
end
candidates.grep(/^#{message}/).collect{|e| receiver << "::" << e}
@@ -127,7 +127,7 @@ class Pry::InputCompleter
message = Regexp.quote($5)
begin
candidates = eval(receiver, bind).methods.collect(&:to_s)
- rescue RescuableException
+ rescue Pry::RescuableException
candidates = []
end
select_message(path, receiver, message, candidates)
@@ -137,7 +137,7 @@ class Pry::InputCompleter
message = Regexp.quote($2)
begin
candidates = eval(receiver, bind).methods.collect(&:to_s)
- rescue RescuableException
+ rescue Pry::RescuableException
candidates = []
end
select_message(path, receiver, message, candidates)
@@ -157,7 +157,7 @@ class Pry::InputCompleter
# Foo::Bar.func
begin
candidates = eval("#{receiver}.methods", bind).collect(&:to_s)
- rescue RescuableException
+ rescue Pry::RescuableException
candidates = []
end
else
@@ -166,7 +166,7 @@ class Pry::InputCompleter
ObjectSpace.each_object(Module){|m|
begin
name = m.name.to_s
- rescue RescuableException
+ rescue Pry::RescuableException
name = ""
end
next if name != "IRB::Context" and
@@ -201,7 +201,7 @@ class Pry::InputCompleter
candidates = (candidates|ReservedWords|custom_completions).grep(/^#{Regexp.quote(input)}/)
candidates.collect(&path)
end
- rescue RescuableException
+ rescue Pry::RescuableException
[]
end
end