From 24ffa4386ab84df107a6fd77505fb54bdc8d3673 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 29 Oct 2020 11:43:13 +0900 Subject: The path of the gem should be relative from `MRUBY_ROOT`. It was relative from the directory of the build configuration file, but the document says it's relative from `MRUBY_ROOT`. When the default configuration file was `MRUBY_ROOT/build_config.rb`, it was OK for most of the cases. --- lib/mruby/build/load_gems.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mruby/build/load_gems.rb b/lib/mruby/build/load_gems.rb index 753476b01..b2b185f05 100644 --- a/lib/mruby/build/load_gems.rb +++ b/lib/mruby/build/load_gems.rb @@ -18,8 +18,7 @@ module MRuby elsif GemBox.path && gemdir.is_a?(String) gemdir = File.expand_path(gemdir, File.dirname(GemBox.path)) else - caller_dir = File.expand_path(File.dirname(caller(1,1)[0][/^(.*?):\d/,1])) - gemdir = File.expand_path(gemdir, caller_dir) + gemdir = File.expand_path(gemdir, MRUBY_ROOT) end gemrake = File.join(gemdir, "mrbgem.rake") -- cgit v1.2.3