mirror of https://github.com/rails/rails
Remove deprecated AS::BasicObject, use AS::ProxyObject instead
This commit is contained in:
parent
4b97ce5eb1
commit
cad3a13086
|
@ -1,3 +1,7 @@
|
|||
* Remove deprecated `ActiveSupport::BasicObject`, use `ActiveSupport::ProxyObject` instead.
|
||||
|
||||
*Carlos Antonio da Silva*
|
||||
|
||||
* Remove deprecated `BufferedLogger`.
|
||||
|
||||
*Yves Senn*
|
||||
|
|
|
@ -39,7 +39,6 @@ module ActiveSupport
|
|||
|
||||
eager_autoload do
|
||||
autoload :BacktraceCleaner
|
||||
autoload :BasicObject
|
||||
autoload :ProxyObject
|
||||
autoload :Benchmarkable
|
||||
autoload :Cache
|
||||
|
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue