aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation/behaviors.rb
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2010-07-10 17:36:10 +0100
committerGonçalo Silva <goncalossilva@gmail.com>2010-07-10 17:36:10 +0100
commitcd2bbed9846d84a1230a1b9e52843eedca17b28d (patch)
tree5214b7855f3d102e4c22239b9d62bc5717cb3547 /activesupport/lib/active_support/deprecation/behaviors.rb
parentd2c633ba0bfb7baacdee89a46d7d036d24c68817 (diff)
parent80e47d7b88dcc732ebeb5290faab6e529829dac6 (diff)
downloadrails-cd2bbed9846d84a1230a1b9e52843eedca17b28d.tar.gz
rails-cd2bbed9846d84a1230a1b9e52843eedca17b28d.tar.bz2
rails-cd2bbed9846d84a1230a1b9e52843eedca17b28d.zip
Merge branch 'master' of http://github.com/rails/rails
Diffstat (limited to 'activesupport/lib/active_support/deprecation/behaviors.rb')
-rw-r--r--activesupport/lib/active_support/deprecation/behaviors.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb
index feb1508586..f54f65dcf0 100644
--- a/activesupport/lib/active_support/deprecation/behaviors.rb
+++ b/activesupport/lib/active_support/deprecation/behaviors.rb
@@ -1,4 +1,5 @@
require "active_support/notifications"
+require "active_support/core_ext/array/wrap"
module ActiveSupport
module Deprecation
@@ -7,11 +8,11 @@ module ActiveSupport
attr_accessor :debug
def behavior
- @behavior ||= DEFAULT_BEHAVIORS[:stderr]
+ @behavior ||= [DEFAULT_BEHAVIORS[:stderr]]
end
def behavior=(behavior)
- @behavior = DEFAULT_BEHAVIORS[behavior] || behavior
+ @behavior = Array.wrap(behavior).map { |b| DEFAULT_BEHAVIORS[b] || b }
end
end