aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-22 10:26:44 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-22 10:26:44 -0500
commit8a87d8a6c2c6dfb423bcaf61c750010d80993b16 (patch)
tree16c43dd83a34f451bc0dbddbd7167ce78ffed351 /activesupport/lib/active_support/core_ext/object
parent8b858782fa693e89a47fc3dd5ae38d842ede6d04 (diff)
downloadrails-8a87d8a6c2c6dfb423bcaf61c750010d80993b16.tar.gz
rails-8a87d8a6c2c6dfb423bcaf61c750010d80993b16.tar.bz2
rails-8a87d8a6c2c6dfb423bcaf61c750010d80993b16.zip
Improved Memoizable test coverage and added support for multiple arguments
Diffstat (limited to 'activesupport/lib/active_support/core_ext/object')
-rw-r--r--activesupport/lib/active_support/core_ext/object/metaclass.rb5
1 files changed, 5 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
index 169a76dfb7..93fb0ad594 100644
--- a/activesupport/lib/active_support/core_ext/object/metaclass.rb
+++ b/activesupport/lib/active_support/core_ext/object/metaclass.rb
@@ -5,4 +5,9 @@ class Object
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