提交 ca6868a4 编写于 作者: A aycabta

Do "write" to temp stdin before "reopen"

上级 bed6b720
......@@ -116,14 +116,14 @@ def launch_irb_with_irbrc_and_irb_history(irbrc, irb_history)
end
with_temp_stdio do |stdin, stdout|
yield(stdin, stdout)
stdin.close
stdout.flush
replace_stdio(stdin.path, stdout.path) do
yield(stdin, stdout)
stdin.close
system('ruby', '-Ilib', '-Itest', '-W0', '-rirb', '-e', 'IRB.start(__FILE__)')
stdout.flush
result = stdout.read
stdout.close
end
result = stdout.read
stdout.close
end
open(IRB.rc_file("_history"), "r") do |f|
result_history = f.read
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册