[前][次][番号順一覧][スレッド一覧]

ruby-changes:68059

From: Nobuyoshi <ko1@a...>
Date: Tue, 21 Sep 2021 23:28:19 +0900 (JST)
Subject: [ruby-changes:68059] c94718e39f (master): [ruby/irb] Check if Gem::Specification is defined

https://git.ruby-lang.org/ruby.git/commit/?id=c94718e39f

From c94718e39fdeca4ae2079b7be64e42023e846aa3 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 17 Sep 2021 20:01:15 +0900
Subject: [ruby/irb] Check if Gem::Specification is defined

https://github.com/ruby/irb/commit/005ade74dd
---
 lib/irb/completion.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index fe2962e..5752102 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -59,8 +59,8 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/completion.rb#L59
             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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]