On Mon, 29 Apr 2002, Sasa Velickovic wrote:
> Hello folks,
> 
> how can I clear the screen in the console (winxp) with ruby? I tried
> 
> %x{cls}

What happens when you try system("cls") ?

Other options: Scroll the current screen content away:
MAX_DOSWINDOW_LINES = 50
puts ("\n" * (MAX_DOSWINDOW_LINES * 2 - 1))

When searching for `console clear screen' at google, the first hit is an
article from microsoft about clearing the console screen. It contains,
apart from the system("cls") tip, the source code for a C function to
clear the screen. If all else fails, you could still create a small ruby
extension that contains this code.

Or maybe you want to use ncurses? I think it can cope with dos boxes, too.
http://ncurses-ruby.berlios.de/ ;-)

Tobias