From 4201e2b3d069c66c35bd2eac98f963186ad76409 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 27 Jan 2012 20:53:37 +0000 Subject: * 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/branches/ruby_1_9_3@34384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/irb/completion.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') 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! -- cgit v1.2.3