rubinius/rubinius — pull request #1781 by lenary (2012-06-13 13:57:33+00:00)
Title: Noisy VM Mode

Sometimes it's useful to be able to diagnose various things via the noise they make, rather than them just printing something.

Someone showed me that haskell has a `-B` flag that makes your computer beep every time GC runs, and I thought it would be cool/fun/useful to implement for various other languages (including ruby), so I have

It is guarded by also having to enable `gc.show` so that you get that info as well. I (and others) felt this was the least offensive approach, but they could be made independent in future.

It beeps once for every young generation GC, and twice for every mature generation GC. The beeping is just done by sending ASCII BELL to standard error - so without a terminal/tty it probably won't work.