diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-27 20:53:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-27 20:53:37 +0000 |
commit | 4201e2b3d069c66c35bd2eac98f963186ad76409 (patch) | |
tree | 8090dd47f06da54f44e1bc078de7dcd0b3edd036 /lib | |
parent | 3c0ebab6f1598377fc652ec2ebe2411d19bd1bc8 (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/branches/ruby_1_9_3@34384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/completion.rb | 8 |
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! |