From 763f32ab47b96289a4d7b7107411a83164bf69de Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 25 Feb 2010 11:12:27 -0800 Subject: metaclass deprecated in 2.3.6 --- activesupport/lib/active_support/core_ext/object.rb | 1 - .../lib/active_support/core_ext/object/metaclass.rb | 14 -------------- activesupport/test/core_ext/object_and_class_ext_test.rb | 7 ------- 3 files changed, 22 deletions(-) delete mode 100644 activesupport/lib/active_support/core_ext/object/metaclass.rb (limited to 'activesupport') diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 9dc6ca66a4..4f86d9d605 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -5,7 +5,6 @@ require 'active_support/core_ext/object/try' require 'active_support/core_ext/object/conversions' require 'active_support/core_ext/object/instance_variables' -require 'active_support/core_ext/object/metaclass' require 'active_support/core_ext/object/singleton_class' require 'active_support/core_ext/object/misc' require 'active_support/core_ext/object/extending' diff --git a/activesupport/lib/active_support/core_ext/object/metaclass.rb b/activesupport/lib/active_support/core_ext/object/metaclass.rb deleted file mode 100644 index 4b36a243c9..0000000000 --- a/activesupport/lib/active_support/core_ext/object/metaclass.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'active_support/deprecation' - -class Object - # Get object's meta (ghost, eigenclass, singleton) class. - # - # Deprecated in favor of Object#singleton_class. - def metaclass - class << self - self - end - end - - deprecate :metaclass => :singleton_class -end diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index 00c59d84b8..437bb78a4e 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -123,13 +123,6 @@ class ObjectTests < ActiveSupport::TestCase o = Object.new assert_equal class << o; self end, o.singleton_class end - - def test_metaclass_deprecated - o = Object.new - assert_deprecated /use singleton_class instead/ do - assert_equal o.singleton_class, o.metaclass - end - end end class ObjectInstanceVariableTest < Test::Unit::TestCase -- cgit v1.2.3