From: camenix Date: 2006-11-01T20:00:20+09:00 Subject: Re: How to hide dos prompt? On Nov 1, 11:23 am, "Austin Ziegler" wrote: >You can only hide the DOS prompt by using rubyw.exe (there's no > console). You can, however redirect the STDERR and STDOUT (and STDIN, > don't forget) to either strings or files. > How to redirect ? Is like this: lib.rb def hello puts "hello,world!" end main.rb require 'lib' f=open('h.txt','w') # It didn't work f.reopen($stdout) # It didn't work puts "hi!" hello