Permalink
Browse files

Update simple_app example

  • Loading branch information...
mynyml committed Jan 29, 2010
1 parent 5834fde commit fd43bd93402d13c61be3255287960b9e4b30df06
Showing with 3 additions and 5 deletions.
  1. +3 −5 examples/simple_app.ru
View
@@ -1,11 +1,9 @@
# run me with:
-# $rackup examples/simple_app.ru -p 8080
+# $rackup examples/simple_app.ru
#
require 'pathname'
-root = Pathname(__FILE__).dirname.parent.expand_path
-$:.unshift(root + 'lib')
+$:.unshift Pathname(__FILE__).dirname.parent + 'lib'
-require 'rubygems'
require 'rack'
require 'rack/respond_to'
@@ -23,7 +21,7 @@ class App
end
end
- [200, {'Content-Type' => Rack::RespondTo.selected_media_type}, [body]]
+ [200, {'Content-Type' => Rack::RespondTo.selected_media_type || ''}, [body || '']]
end
end

0 comments on commit fd43bd9

Please sign in to comment.