summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-10-29 11:43:13 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-29 11:49:05 +0900
commit24ffa4386ab84df107a6fd77505fb54bdc8d3673 (patch)
tree9e224c20b709c724fe816e0cacd9425de4ef56d4 /lib
parent33742d941ff3e8e361c6d3a36071765b686cb94c (diff)
downloadmruby-24ffa4386ab84df107a6fd77505fb54bdc8d3673.tar.gz
mruby-24ffa4386ab84df107a6fd77505fb54bdc8d3673.zip
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/mruby/build/load_gems.rb3
1 files changed, 1 insertions, 2 deletions
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")