merge @mattn's win-compatibility

This commit is contained in:
Daniel Bovensiepen
2014-04-15 18:28:16 +08:00
parent a182a0d38c
commit c53846a22a
3 changed files with 8 additions and 4 deletions
+6 -3
View File
@@ -6,7 +6,10 @@ c_dir = File.dirname(__FILE__)
MRUBY_ROOT = File.expand_path("#{c_dir}/../..")
DOC_DIR = File.expand_path(c_dir)
cmd = "#{DOC_DIR}/mrbdoc/mrbdoc.rb #{MRUBY_ROOT} #{DOC_DIR}"
PTY.spawn(cmd) do |i,o,pid|
i.each { |l| print l }
cmd = "ruby #{DOC_DIR}/mrbdoc/mrbdoc.rb #{MRUBY_ROOT} #{DOC_DIR} false"
IO.popen(cmd, "r+") do |io|
io.close_write
while line = io.gets
puts line
end
end
+1 -1
View File
@@ -10,7 +10,7 @@ class MRBDoc
private
def write dir, cfg
File.open(File.expand_path('Core.md', dir), 'w+') do |io|
File.open(File.expand_path('Core.md', dir), 'wb+') do |io|
print_core_classes(io, cfg)
print_core_modules(io, cfg)
end
+1
View File
@@ -8,6 +8,7 @@ require 'mrbdoc_docu'
MRUBY_ROOT = ARGV[0]
DOC_ROOT = ARGV[1]
_WRITE_LINE_NO = ARGV[2]
STDOUT.sync = true
raise ArgumentError.new 'mruby root missing!' if MRUBY_ROOT.nil?
raise ArgumentError.new 'doc root missing!' if DOC_ROOT.nil?