summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-27 20:53:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-27 20:53:37 +0000
commitef72bdf2deda76ca8a537d3eeaa9c3f2111017de (patch)
treeaec38cadd07cd6d1cbdd0eb1fe38dbfcb253f332 /lib
parent0c5cfb68c89d9e521fa8a43afc233764d0934703 (diff)
* lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):
ignore non-string name modules. [ruby-core:42244][Bug #5938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/completion.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index 54e6526957..7fd69a0a09 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -178,8 +178,12 @@ module IRB
rescue Exception
name = ""
end
- next if name != "IRB::Context" and
- /^(IRB|SLex|RubyLex|RubyToken)/ =~ name
+ begin
+ next if name != "IRB::Context" and
+ /^(IRB|SLex|RubyLex|RubyToken)/ =~ name
+ rescue Exception
+ next
+ end
candidates.concat m.instance_methods(false).collect{|x| x.to_s}
}
candidates.sort!