Created
November 19, 2009 01:19
-
-
Save NZKoz/238449 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb | |
| index 540be29..151ae5a 100644 | |
| --- a/activesupport/lib/active_support/deprecation.rb | |
| +++ b/activesupport/lib/active_support/deprecation.rb | |
| @@ -13,7 +13,7 @@ module ActiveSupport | |
| $stderr.puts callstack.join("\n ") if debug | |
| }, | |
| 'development' => Proc.new { |message, callstack| | |
| - logger = defined?(Rails) ? Rails.logger : Logger.new($stderr) | |
| + logger = (defined?(Rails) && Rails.logger) ? Rails.logger : Logger.new($stderr) | |
| logger.warn message | |
| logger.debug callstack.join("\n ") if debug | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment