lib/smallcage/commands/server.rb in smallcage-0.2.6 vs lib/smallcage/commands/server.rb in smallcage-0.2.7
- old
+ new
@@ -4,11 +4,11 @@
document_root = opts[:path]
port = opts[:port]
server = SmallCage::HTTPServer.new(document_root, port)
- sighandler = Proc.new {|signal| server.shutdown}
- SmallCage::Application.add_signal_handler(["INT", "TERM"], sighandler)
+ sighandler = Proc.new { |signal| server.shutdown }
+ SmallCage::Application.add_signal_handler(%w{INT TERM}, sighandler)
server.start
end
end
end