Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4939

Show
Ignore:
Timestamp:
09/03/06 20:37:25 (2 years ago)
Author:
david
Message:

If not running in Rails, we will log deprecations to $stderr

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/deprecation.rb

    r4936 r4939  
    1010    class << self 
    1111      def warn(message = nil, callstack = caller) 
    12         behavior.call(deprecation_message(callstack, message)) if behavior && ! silenced? 
     12        behavior.call(deprecation_message(callstack, message)) if behavior && !silenced? 
    1313      end 
    1414 
    1515      def default_behavior 
    16         DEFAULT_BEHAVIORS[RAILS_ENV.to_s] if defined?(RAILS_ENV) 
     16        if defined?(RAILS_ENV) 
     17          DEFAULT_BEHAVIORS[RAILS_ENV.to_s] 
     18        else 
     19          DEFAULT_BEHAVIORS['test'] 
     20        end 
    1721      end 
    1822