# 1.9.1's rubyw.exe can not read from pipe?

**URL:** <https://www.ruby-forum.com/t/1-9-1s-rubyw-exe-can-not-read-from-pipe/181700>\
**Category:** Ruby\
**Created:** [January 16, 2010, 6:14am UTC](https://www.ruby-forum.com/t/1-9-1s-rubyw-exe-can-not-read-from-pipe/181700 "2010-01-16T06:14:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![night\_stalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f0a364/32.png) [@night\_stalker](https://www.ruby-forum.com/u/night_stalker)\
**Post date:** [January 16, 2010, 6:14am UTC](https://www.ruby-forum.com/t/1-9-1s-rubyw-exe-can-not-read-from-pipe/181700/1 "2010-01-16T06:14:16Z")

</div>

I found this problem when writing a GUI app with wxruby.

Minimal test code (run “dir” and write result to “res.txt”):

```
File.open 'res.txt', 'w' do |f|
  f << `dir`
end

```

ruby.exe and rubyw.exe of 1.8.7p72 are fine,  
but rubyw.exe of 1.9.1p243 (from [rubyinstaller.org](http://rubyinstaller.org)) writes an empty  
file.

Is it a bug of rubyinstaller or 1.9 ?

My OS is Windows 7.

---

<div class="post-metadata">

**Author:** ![night\_stalker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f0a364/32.png) [@night\_stalker](https://www.ruby-forum.com/u/night_stalker)\
**Post date:** [January 16, 2010, 6:40am UTC](https://www.ruby-forum.com/t/1-9-1s-rubyw-exe-can-not-read-from-pipe/181700/2 "2010-01-16T06:40:36Z")

</div>

> ruby.exe and rubyw.exe of 1.8.7p72 are fine,  
> but rubyw.exe of 1.9.1p243 (from [rubyinstaller.org](http://rubyinstaller.org)) writes an empty  
> file.
> 
> Is it a bug of rubyinstaller or 1.9 ?
> 
> My OS is Windows 7.

I get the same thing here with 1.9.1 but not with 1.9.2, so I suppose  
it’s some bug fix that needs to be backported.  
-r
