summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-04-16 09:03:51 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-04-16 09:03:51 +0900
commit8a3663789c52ec5635194656af6b69d3d03120ee (patch)
treedf133fce3ce4056292857300af0549c67d5ee71a
parentccb0572ff948aa83b7fb35143524fa8cd74864cf (diff)
Fix bundled gems installation when relative loading
-rwxr-xr-xtool/rbinstall.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index c40da1a4f3..7119022082 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -853,9 +853,6 @@ module RbInstall
def write_cache_file
end
- def build_extensions
- end if /mswin|mingw/ =~ RUBY_PLATFORM || RbConfig::CONFIG["CROSS_COMPILING"] == "yes"
-
def shebang(bin_file_name)
path = File.join(gem_dir, spec.bindir, bin_file_name)
first_line = File.open(path, "rb") {|file| file.gets}
@@ -907,6 +904,13 @@ module RbInstall
RbInstall.no_write(options) {super}
end
+ if RbConfig::CONFIG["LIBRUBY_RELATIVE"] == "yes" || RbConfig::CONFIG["CROSS_COMPILING"] == "yes"
+ # TODO: always build extensions in bundled gems by build-ext and
+ # install the built binaries.
+ def build_extensions
+ end
+ end
+
def generate_bin_script(filename, bindir)
name = formatted_program_filename(filename)
unless $dryrun