diff options
Diffstat (limited to 'lib/irb/completion.rb')
-rw-r--r-- | lib/irb/completion.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index c21ebfbdbd..6a7e04264a 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -450,30 +450,5 @@ module IRB end end end - - def self.ignored_modules - # We could cache the result, but this is very fast already. - # By using this approach, we avoid Module#name calls, which are - # relatively slow when there are a lot of anonymous modules defined. - s = {} - - scanner = lambda do |m| - next if s.include?(m) # IRB::ExtendCommandBundle::EXCB recurses. - s[m] = true - m.constants(false).each do |c| - value = m.const_get(c) - scanner.call(value) if value.is_a?(Module) - end - end - - %i(IRB RubyLex).each do |sym| - next unless Object.const_defined?(sym) - scanner.call(Object.const_get(sym)) - end - - s.delete(IRB::Context) if defined?(IRB::Context) - - s - end end end |