# Trap Interrupts trap("INT") do puts "Shutting down..." exit end
当我中断程序时,打印出以下内容(Mac OSX Lion):
^CShutting down…
有没有办法从Ruby隐藏^ C?