aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/metaclass.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-07-17 11:52:56 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-07-17 11:52:56 -0700
commit636e6b7138864ceb1e309939cd879e710b287f3e (patch)
tree2a36dfef02f706302a20bb5b2d428b32e9af97f0 /activesupport/lib/active_support/core_ext/object/metaclass.rb
parent842917dea0cfdf70f158a312cc1f77f769791d8c (diff)
parent99930d499e424f4560b371412e05d10476216ece (diff)
downloadrails-636e6b7138864ceb1e309939cd879e710b287f3e.tar.gz
rails-636e6b7138864ceb1e309939cd879e710b287f3e.tar.bz2
rails-636e6b7138864ceb1e309939cd879e710b287f3e.zip
Merge branch 'master' into i18n-merge
Conflicts: actionpack/lib/action_view/helpers/form_options_helper.rb activerecord/lib/active_record/validations.rb
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object/metaclass.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/object/metaclass.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/metaclass.rb b/activesupport/lib/active_support/core_ext/object/metaclass.rb
new file mode 100644
index 0000000000..169a76dfb7
--- /dev/null
+++ b/activesupport/lib/active_support/core_ext/object/metaclass.rb
@@ -0,0 +1,8 @@
+class Object
+ # Get object's meta (ghost, eigenclass, singleton) class
+ def metaclass
+ class << self
+ self
+ end
+ end
+end