Skip to content
Browse files

Rescue any type of exception when trying to complete code. [Closes #1…

…033]

You'll see the exception if the `-d' option is given.
  • Loading branch information...
1 parent 3f5f71b commit 332ac856cc19058a20469a9b2a0757badc0c77ec @alloy alloy committed Mar 31, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/irb/ext/completion.rb
View
5 lib/irb/ext/completion.rb
@@ -76,8 +76,6 @@ def instance_methods
def instance_methods_of(klass_name)
klass = evaluate(klass_name)
INCLUDE_MACRUBY_HELPERS ? klass.instance_methods(true, true) : klass.instance_methods(true)
- rescue NameError
- nil
end
# TODO: test and or fix the fact that we need to get constants from the
@@ -139,6 +137,9 @@ def results
end
result.sort.uniq if result
end
+
+ rescue Exception => e
+ nil
end
def expand_path(source)

0 comments on commit 332ac85

Please sign in to comment.
Something went wrong with that request. Please try again.