"#{MRUBY_ROOT}/mrbgems/g" add to the default search path

This commit is contained in:
Akira Yumiyama
2012-12-18 14:52:24 +09:00
parent 384633dd5a
commit 335ec2ae2b
+4
View File
@@ -64,6 +64,10 @@ end
def for_each_gem(&block)
IO.readlines(ACTIVE_GEMS).map { |line|
path = line.chomp
if not File.exist?(path)
path2 = File.join MRUBY_ROOT, 'mrbgems', 'g', path
path = path2 if File.exist? path2
end
gemname = File.basename(path)
escaped_gemname = gemname.gsub(/-/, '_')
block.call(path, gemname, escaped_gemname)