diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-22 10:26:44 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-22 10:26:44 -0500 |
commit | 8a87d8a6c2c6dfb423bcaf61c750010d80993b16 (patch) | |
tree | 16c43dd83a34f451bc0dbddbd7167ce78ffed351 /activesupport/lib/active_support/core_ext | |
parent | 8b858782fa693e89a47fc3dd5ae38d842ede6d04 (diff) | |
download | rails-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')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/metaclass.rb | 5 |
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 |