fix test alarm() case for Ruby 1.9