diff --git a/lib/mail_catcher.rb b/lib/mail_catcher.rb index 748aa373..829eb8df 100644 --- a/lib/mail_catcher.rb +++ b/lib/mail_catcher.rb @@ -193,9 +193,9 @@ def run! options=nil # Make sure we quit nicely when asked # We need to handle outside the trap context, hence the timer - %w(INT TERM QUIT).each do |signal| - trap(signal) { EM.add_timer(0) { quit! } } - end + trap("INT") { EM.add_timer(0) { quit! } } + trap("TERM") { EM.add_timer(0) { quit! } } + trap("QUIT") { EM.add_timer(0) { quit! } } unless windows? # Open the web browser before detatching console if options[:browse]