While-loop not executable in RDE

I have written a small script with a while-loop and tried to execute it
in RDE. But the console shows nothing but only "[EOF]" and it is dark
grey. I have to stop it manually.

The script is like this:

while true
  print "Input: "
  input = gets.chop

  case input
    when "exit" then break
    when "calc" then calc
    else puts "Input is invalid!"
  end

end

In DOS it works well. Does anyone know the problem?

draq wrote:

I have written a small script with a while-loop and tried to execute it
in RDE. But the console shows nothing but only "[EOF]" and it is dark
grey. I have to stop it manually.

In DOS it works well. Does anyone know the problem?

Put the following line at the top and then you'll see your prompt
(which is there, but stuck in a windows buffer):

  STDOUT.sync=true

daz

Thank you, daz! Do you know the link to the official bug-list?
Is there a possibility to execute this line automatically before every
execution?

draq

draq wrote:

Thank you, daz! Do you know the link to the official bug-list?

http://sourceforge.net/forum/forum.php?forum_id=142794

It's not an RDE bug, it's a Windows 9x thing.

I'm told that on XP, a read from STDIN flushes STDOUT
first, so you don't get this annoyance.

Is there a possibility to execute this line automatically
before every execution?

Buffers speed things up substantially; you could be
redirecting STDOUT to a disk file. So no-one's
going to do that -- you just have to remember it
before a puts/gets sequence.

Try taking it out again and you'll see that you can
input data OK but responses will be delayed.

STDERR is *not* buffered, so you see error messages straight away.

daz