Skip to content

Commit

Permalink
Merge pull request #1107 from masuidrive/fixed_testrb_path
Browse files Browse the repository at this point in the history
Fixed testrb load path
  • Loading branch information
matz committed Mar 29, 2013
2 parents eb4e0f8 + 32d1edb commit 6818ec0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/mrbgems_test.rake
Expand Up @@ -10,7 +10,11 @@ MRuby.each_target do
file g.test_rbireps => [g.test_rbfiles].flatten + [g.build.mrbcfile, libfile("#{build_dir}/lib/libmruby")] do |t|
open(t.name, 'w') do |f|
g.print_gem_init_header(f)
g.build.mrbc.run f, g.test_preload, "gem_test_irep_#{g.funcname}_preload"
test_preload = [g.dir, MRUBY_ROOT].map {|dir|
File.expand_path(g.test_preload, dir)
}.find {|file| File.exists?(file) }

g.build.mrbc.run f, test_preload, "gem_test_irep_#{g.funcname}_preload"
g.test_rbfiles.flatten.each_with_index do |rbfile, i|
g.build.mrbc.run f, rbfile, "gem_test_irep_#{g.funcname}_#{i}"
end
Expand Down

0 comments on commit 6818ec0

Please sign in to comment.