avoid Dir.exist? that is not available in Ruby1.8

parent 36836c8e
......@@ -55,7 +55,7 @@ module MRuby
MRuby::Gem.current = self
@build.compilers.each do |compiler|
compiler.include_paths << "#{dir}/include"
end if Dir.exist? "#{dir}/include"
end if File.exist? "#{dir}/include"
MRuby::Build::COMMANDS.each do |command|
instance_variable_set("@#{command}", @build.send(command).clone)
end
......
......@@ -194,7 +194,7 @@ module MRuby
end
def run_bintest
targets = @gems.select { |v| Dir.exists? "#{v.dir}/bintest" }.map { |v| filename v.dir }
targets = @gems.select { |v| File.exist? "#{v.dir}/bintest" }.map { |v| filename v.dir }
sh "ruby test/bintest.rb #{targets.join ' '}"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment