mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove deprecated AS::BasicObject, use AS::ProxyObject instead
This commit is contained in:
parent
4b97ce5eb1
commit
cad3a13086
4 changed files with 4 additions and 24 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
* Remove deprecated `ActiveSupport::BasicObject`, use `ActiveSupport::ProxyObject` instead.
|
||||||
|
|
||||||
|
*Carlos Antonio da Silva*
|
||||||
|
|
||||||
* Remove deprecated `BufferedLogger`.
|
* Remove deprecated `BufferedLogger`.
|
||||||
|
|
||||||
*Yves Senn*
|
*Yves Senn*
|
||||||
|
|
|
@ -39,7 +39,6 @@ module ActiveSupport
|
||||||
|
|
||||||
eager_autoload do
|
eager_autoload do
|
||||||
autoload :BacktraceCleaner
|
autoload :BacktraceCleaner
|
||||||
autoload :BasicObject
|
|
||||||
autoload :ProxyObject
|
autoload :ProxyObject
|
||||||
autoload :Benchmarkable
|
autoload :Benchmarkable
|
||||||
autoload :Cache
|
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 a new issue