If not running in Rails, we will log deprecations to $stderr
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
761f1f1f3a
commit
eb90b94afd
@ -9,11 +9,15 @@ module Deprecation
|
||||
|
||||
class << self
|
||||
def warn(message = nil, callstack = caller)
|
||||
behavior.call(deprecation_message(callstack, message)) if behavior && ! silenced?
|
||||
behavior.call(deprecation_message(callstack, message)) if behavior && !silenced?
|
||||
end
|
||||
|
||||
def default_behavior
|
||||
DEFAULT_BEHAVIORS[RAILS_ENV.to_s] if defined?(RAILS_ENV)
|
||||
if defined?(RAILS_ENV)
|
||||
DEFAULT_BEHAVIORS[RAILS_ENV.to_s]
|
||||
else
|
||||
DEFAULT_BEHAVIORS['test']
|
||||
end
|
||||
end
|
||||
|
||||
# Have deprecations been silenced?
|
||||
|
Loading…
Reference in New Issue
Block a user