Skip to content

Commit

Permalink
Check if Gem::Specification is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 17, 2021
1 parent 05c6585 commit 005ade7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/irb/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def self.retrieve_gem_and_system_load_path
File.join(s.full_gem_path, p)
end
}
}.flatten
(gem_paths + $LOAD_PATH).uniq.sort
}.flatten if defined?(Gem::Specification)
(gem_paths.to_a | $LOAD_PATH).sort
end

def self.retrieve_files_to_require_from_load_path
Expand Down

0 comments on commit 005ade7

Please sign in to comment.