What is the easiest way I can create a 'beep' sound from a Ruby program?

Daniel X Moore picture Daniel X Moore · Mar 7, 2009 · Viewed 13.2k times · Source

I'm making a small ruby command line script and I wanted to know what the simplest way to have the program emit a beep is.

Answer

Paige Ruten picture Paige Ruten · Mar 7, 2009

Try printing the audible bell character:

print "\a"