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

ruby-changes:65073

From: Kazuhiro <ko1@a...>
Date: Thu, 28 Jan 2021 18:03:48 +0900 (JST)
Subject: [ruby-changes:65073] 7cd97a81d1 (master): Remove require_path from $LOADED_FEATURES

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

From 7cd97a81d1010ec8f10585d86e7271a4a40e3990 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Thu, 28 Jan 2021 17:55:26 +0900
Subject: Remove require_path from $LOADED_FEATURES

because some features are already loaded.
---
 spec/bundler/support/matchers.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/spec/bundler/support/matchers.rb b/spec/bundler/support/matchers.rb
index 3d926f5..6c9ab0d 100644
--- a/spec/bundler/support/matchers.rb
+++ b/spec/bundler/support/matchers.rb
@@ -127,6 +127,7 @@ module Spec https://github.com/ruby/ruby/blob/trunk/spec/bundler/support/matchers.rb#L127
             code << "exclude_from_load_path = File.expand_path('#{exclude_from_load_path}')"
             code << "$LOAD_PATH.delete_if { |path| File.expand_path(path) == exclude_from_load_path }"
           end
+          code << "$LOADED_FEATURES.delete_if { |feature| File.basename(feature, '.*') == '#{require_path}' }"
           code << "require '#{require_path}.rb'"
           code << "puts #{version_const}"
           run code.join("; "), *groups
-- 
cgit v1.1


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

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