X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fobject%2Fmetaclass.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Fobject%2Fmetaclass.rb;h=93fb0ad594c51e943b5758c9f1f2c891219b0e8c;hb=d115f2e23823271635bad69229a42cd8ac68debe;hp=0000000000000000000000000000000000000000;hpb=37cb670bf3ddde90b214e591f100ed4446469484;p=depot.git

diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb b/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
new file mode 100644
index 0000000..93fb0ad
--- /dev/null
+++ b/vendor/rails/activesupport/lib/active_support/core_ext/object/metaclass.rb
@@ -0,0 +1,13 @@
+class Object
+  # Get object's meta (ghost, eigenclass, 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
+end