2010-05-25 19:45:45 +02:00
|
|
|
require 'active_support/deprecation'
|
|
|
|
|
2008-10-27 07:47:01 +01:00
|
|
|
class Object
|
2010-05-25 19:45:45 +02:00
|
|
|
# Get object's meta (ghost, eigenclass, singleton) class.
|
|
|
|
#
|
|
|
|
# Deprecated in favor of Object#singleton_class.
|
2008-10-27 07:47:01 +01:00
|
|
|
def metaclass
|
|
|
|
class << self
|
|
|
|
self
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2010-05-25 19:45:45 +02:00
|
|
|
deprecate :metaclass => :singleton_class
|
2008-10-27 07:47:01 +01:00
|
|
|
end
|