summary refs log tree commit
diff options
context:
space:
mode:
-rw-r--r--lib/rack/handler.rb2
-rw-r--r--test/spec_handler.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/rack/handler.rb b/lib/rack/handler.rb
index f11e37e3..8a5fadd5 100644
--- a/lib/rack/handler.rb
+++ b/lib/rack/handler.rb
@@ -19,7 +19,7 @@ module Rack
       if klass = @handlers[server]
         klass.split("::").inject(Object) { |o, x| o.const_get(x) }
       else
-        const_get(server)
+        const_get(server, false)
       end
 
     rescue NameError => name_error
diff --git a/test/spec_handler.rb b/test/spec_handler.rb
index e8f41fdc..c252c176 100644
--- a/test/spec_handler.rb
+++ b/test/spec_handler.rb
@@ -23,6 +23,10 @@ describe Rack::Handler do
     lambda {
       Rack::Handler.get('boom')
     }.should.raise(LoadError)
+
+    lambda {
+      Rack::Handler.get('Object')
+    }.should.raise(LoadError)
   end
 
   should "get unregistered, but already required, handler by name" do