diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-09-17 20:01:15 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-21 23:28:09 +0900 |
commit | c94718e39fdeca4ae2079b7be64e42023e846aa3 (patch) | |
tree | 0b9c6551359456f953895a298212f6f76a9c0e03 | |
parent | 4576cdca7390ed694536cabf2e699d22c5e0750b (diff) |
[ruby/irb] Check if Gem::Specification is defined
https://github.com/ruby/irb/commit/005ade74dd
-rw-r--r-- | lib/irb/completion.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index fe2962e780..57521025f0 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -59,8 +59,8 @@ module IRB 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 |