ruby-changes:72539
From: Nobuyoshi <ko1@a...>
Date: Thu, 14 Jul 2022 09:00:28 +0900 (JST)
Subject: [ruby-changes:72539] 9d900620ca (master): Set `GEM_PATH` environment variable in runruby.rb
https://git.ruby-lang.org/ruby.git/commit/?id=9d900620ca From 9d900620cafc379f527ee04a338f3a7f5daf6962 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 13 Jul 2022 23:50:02 +0900 Subject: Set `GEM_PATH` environment variable in runruby.rb --- tool/runruby.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tool/runruby.rb b/tool/runruby.rb index bff5d031cc..d9a4c855d3 100755 --- a/tool/runruby.rb +++ b/tool/runruby.rb @@ -122,6 +122,12 @@ if e = ENV["RUBYLIB"] https://github.com/ruby/ruby/blob/trunk/tool/runruby.rb#L122 end env["RUBYLIB"] = $:.replace(libs).join(File::PATH_SEPARATOR) +gem_path = [abs_archdir, srcdir].map {|d| File.realdirpath(".bundle", d)} +if e = ENV["GEM_PATH"] + gem_path |= e.split(File::PATH_SEPARATOR) +end +env["GEM_PATH"] = gem_path.join(File::PATH_SEPARATOR) + libruby_so = File.join(abs_archdir, config['LIBRUBY_SO']) if File.file?(libruby_so) if e = config['LIBPATHENV'] and !e.empty? -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/