1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Check if Gem::Specification is defined

https://github.com/ruby/irb/commit/005ade74dd
This commit is contained in:
Nobuyoshi Nakada 2021-09-17 20:01:15 +09:00 committed by git
parent 4576cdca73
commit c94718e39f

View file

@ -59,8 +59,8 @@ module IRB
File.join(s.full_gem_path, p) File.join(s.full_gem_path, p)
end end
} }
}.flatten }.flatten if defined?(Gem::Specification)
(gem_paths + $LOAD_PATH).uniq.sort (gem_paths.to_a | $LOAD_PATH).sort
end end
def self.retrieve_files_to_require_from_load_path def self.retrieve_files_to_require_from_load_path