IRB clear screen on windows

/ Published in: Ruby
Save to your folder(s)

Since there is no convenient way to clear the console in irb on windows, we can simple emulate the dos cls function

Copy this code and paste it in your HTML
  1. # throw this inside %userprofile%\.irbrc and you're good
  2. def cls
  3. system('cls')
  4. end


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.