Remove deprecated AS::BasicObject, use AS::ProxyObject instead

This commit is contained in:
Carlos Antonio da Silva 2013-07-01 22:26:54 -03:00
parent 4b97ce5eb1
commit cad3a13086
4 changed files with 4 additions and 24 deletions

View File

@ -1,3 +1,7 @@
* Remove deprecated `ActiveSupport::BasicObject`, use `ActiveSupport::ProxyObject` instead.
*Carlos Antonio da Silva*
* Remove deprecated `BufferedLogger`.
*Yves Senn*

View File

@ -39,7 +39,6 @@ module ActiveSupport
eager_autoload do
autoload :BacktraceCleaner
autoload :BasicObject
autoload :ProxyObject
autoload :Benchmarkable
autoload :Cache

View File

@ -1,11 +0,0 @@
require 'active_support/deprecation'
require 'active_support/proxy_object'
module ActiveSupport
class BasicObject < ProxyObject # :nodoc:
def self.inherited(*)
::ActiveSupport::Deprecation.warn 'ActiveSupport::BasicObject is deprecated! Use ActiveSupport::ProxyObject instead.'
super
end
end
end

View File

@ -1,12 +0,0 @@
require 'abstract_unit'
require 'active_support/deprecation'
require 'active_support/basic_object'
class BasicObjectTest < ActiveSupport::TestCase
test 'BasicObject warns about deprecation when inherited from' do
warn = 'ActiveSupport::BasicObject is deprecated! Use ActiveSupport::ProxyObject instead.'
ActiveSupport::Deprecation.expects(:warn).with(warn).once
Class.new(ActiveSupport::BasicObject)
end
end