Created
October 13, 2008 01:39
-
-
Save djwonk/16485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 27114d268267fce766dbb3511f54463851b2f3bd Mon Sep 17 00:00:00 2001 | |
From: David James <djwonk@collectiveinsight.net> | |
Date: Sun, 12 Oct 2008 21:14:07 -0400 | |
Subject: [PATCH] Fixed warning about STATUS_CODES due to 2 requires. | |
--- | |
lib/merb-core/autoload.rb | 4 ---- | |
lib/merb-core/controller/status_codes.rb | 4 ++-- | |
2 files changed, 2 insertions(+), 6 deletions(-) | |
diff --git a/lib/merb-core/autoload.rb b/lib/merb-core/autoload.rb | |
index 5a29cdc..86a1d8b 100644 | |
--- a/lib/merb-core/autoload.rb | |
+++ b/lib/merb-core/autoload.rb | |
@@ -29,7 +29,3 @@ require "merb-core/controller/merb_controller" | |
module Merb | |
module InlineTemplates; end | |
end | |
- | |
-# StatusCodes does not autoload properly if placed with the above autoload | |
-# statements. ControllerExceptions depends upon StatusCodes loading first. | |
-require "merb-core/controller/status_codes" | |
diff --git a/lib/merb-core/controller/status_codes.rb b/lib/merb-core/controller/status_codes.rb | |
index 9454032..6241188 100644 | |
--- a/lib/merb-core/controller/status_codes.rb | |
+++ b/lib/merb-core/controller/status_codes.rb | |
@@ -1,5 +1,5 @@ | |
module Merb | |
- | |
+ | |
module StatusCodes | |
STATUS_CODES = [] | |
@@ -82,7 +82,7 @@ module Merb | |
class ServiceUnavailable < Merb::StatusCodes::ServerError; def self.status; 503 end end | |
class GatewayTimeout < Merb::StatusCodes::ServerError; def self.status; 504 end end | |
class HTTPVersionNotSupported < Merb::StatusCodes::ServerError; def self.status; 505 end end | |
- | |
+ | |
STATUS_CODES.each do |item| | |
item[:status] = item[:child_class].status | |
end | |
-- | |
1.6.0.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment