aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object')
-rw-r--r--activesupport/lib/active_support/core_ext/object/metaclass.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/metaclass.rb b/activesupport/lib/active_support/core_ext/object/metaclass.rb
index 93fb0ad594..4b36a243c9 100644
--- a/activesupport/lib/active_support/core_ext/object/metaclass.rb
+++ b/activesupport/lib/active_support/core_ext/object/metaclass.rb
@@ -1,13 +1,14 @@
+require 'active_support/deprecation'
+
class Object
- # Get object's meta (ghost, eigenclass, singleton) class
+ # Get object's meta (ghost, eigenclass, singleton) class.
+ #
+ # Deprecated in favor of Object#singleton_class.
def metaclass
class << self
self
end
end
- # If class_eval is called on an object, add those methods to its metaclass
- def class_eval(*args, &block)
- metaclass.class_eval(*args, &block)
- end
+ deprecate :metaclass => :singleton_class
end