How do you clear the IRB console screen?
+14
A:
On Mac OS X or Linux you can use Ctrl + L to clear the IRB screen.
John Topley
2008-09-22 18:24:57
I should clarify that this applies to Windows only.
Ben Hoffstein
2008-09-22 18:27:46
You can also do system('clear') on linux and it works fine
Orion Edwards
2008-09-23 04:02:35
+4
A:
on *nix boxes
`clear`
on Windows, I don't think there is a good solution.
EDIT:
Interesting:
system 'cls' #works,
`cls` does not.
AShelly
2008-09-22 18:27:23
A:
The backtick operator captures the output of the command and returns it
s = `cls`
puts s
would work better, I guess.
JesperE
2008-09-22 19:04:47