"meinrad.recheis" <my.name.here / gmx.at> wrote: > > daz: my version: ruby 1.7.3; win 2000 > and your script doesn t work for me! > > -- > - mr I ran this script under 173 (failed) then 180 (OK): #<SST.RBW> Rver = "ruby %s (%s) [%s]\n" % [RUBY_VERSION, RUBY_RELEASE_DATE, RUBY_PLATFORM] File.open(, 'w') do |sst| sst.puts(Rver) sst.puts("Start: %s" % [Time.now]) $stdout.sync=true 2.times {|n| puts n; sleep 1} sst.puts(" End : %s" % [Time.now]) end #</SST.RBW> ### Run Box command 1 D:\ruby\bin\ruby173w.exe D:\RUBY\DFB\TEMP\SST.RBW #<'C:\TEMP\sst.txt'> (Output) ruby 1.7.3 (2002-11-17) [i386-mswin32] Start: Fri Aug 08 01:33:17 GMT Daylight Time 2003 #</> No console appeared and it didn't finish. (No End time) ======================================================= ### Run Box command 2 D:\ruby\src_inst\bin\rubyw.exe D:\RUBY\DFB\TEMP\SST.RBW #<'C:\TEMP\sst.txt'> (Output) ruby 1.8.0 (2003-08-04) [i586-bccwin32] Start: Fri Aug 08 01:35:50 2003 End : Fri Aug 08 01:35:52 2003 #</> Console appeared, ran OK. ========================= Even using rubyw.exe, I expect to see a console when writing to STDOUT. The usefulness is that, unlike with ruby.exe, one isn't opened automatically. I believe this is contrasting behaviours of winmain{} and main{} in C rather than of Ruby itself. Any corrections will be welcome. This shows that (if you are still in any doubt) upgrading to Ruby180 is a good idea. daz