From cad3a1308604c9892c4d1cd5d588d93ca1d43f4c Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 1 Jul 2013 22:26:54 -0300 Subject: [PATCH] Remove deprecated AS::BasicObject, use AS::ProxyObject instead --- activesupport/CHANGELOG.md | 4 ++++ activesupport/lib/active_support.rb | 1 - activesupport/lib/active_support/basic_object.rb | 11 ----------- activesupport/test/deprecation/basic_object_test.rb | 12 ------------ 4 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 activesupport/lib/active_support/basic_object.rb delete mode 100644 activesupport/test/deprecation/basic_object_test.rb diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 2f440d7e52..cce0582a0b 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove deprecated `ActiveSupport::BasicObject`, use `ActiveSupport::ProxyObject` instead. + + *Carlos Antonio da Silva* + * Remove deprecated `BufferedLogger`. *Yves Senn* diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index ffa6ffda4f..5e1fe9e556 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -39,7 +39,6 @@ module ActiveSupport eager_autoload do autoload :BacktraceCleaner - autoload :BasicObject autoload :ProxyObject autoload :Benchmarkable autoload :Cache diff --git a/activesupport/lib/active_support/basic_object.rb b/activesupport/lib/active_support/basic_object.rb deleted file mode 100644 index 91aac6db64..0000000000 --- a/activesupport/lib/active_support/basic_object.rb +++ /dev/null @@ -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 diff --git a/activesupport/test/deprecation/basic_object_test.rb b/activesupport/test/deprecation/basic_object_test.rb deleted file mode 100644 index 4b5bed9eb1..0000000000 --- a/activesupport/test/deprecation/basic_object_test.rb +++ /dev/null @@ -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 \ No newline at end of file