I'm using Ruby 1.8.6 and Watir 1.6.2, BTW.
I was stoked !!! Even more so that it worked beautifully.
What I did was to encapsulate it into a def which accepts the IE instance created by watir.
Now, right after going to a page, I would call on "replace_js_popups" to override both confirm and alert, like so.
ie = Watir::IE.new
Of course, this is not a fool proof solution. By replacing the alert and confirm functions with a function that always returns true, you will need to always expect the popups to return a value of true in your automated tests.