From: windwinyubt@... Date: 2015-08-13T02:29:18+00:00 Subject: [ruby-core:70361] [Ruby trunk - Bug #11437] [Open] IO.pipe problem on windows console Issue #11437 has been reported by wind winy. ---------------------------------------- Bug #11437: IO.pipe problem on windows console https://bugs.ruby-lang.org/issues/11437 * Author: wind winy * Status: Open * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- # this code copy from Open3.popen3 def mm(cmd) opts = {} in_r, in_w = IO.pipe opts[:in] = in_r in_w.sync = true out_r, out_w = IO.pipe opts[:out] = out_w pid = spawn(cmd, opts) wait_thr = Process.detach(pid) in_r.close out_w.close result = [in_w, out_r, wait_thr] result end mm('dir') use ruby 2.0 or 2.2 (32bit windows) run this method in irb or pry, return newline and input some chars, press backspace key can delete a char, but screen still show it -- https://bugs.ruby-lang.org/