diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2013-04-13 12:14:12 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2013-04-13 12:14:12 -0500 |
commit | 9e82ffcadac1860d5b835035e4dc4490ef6ed791 (patch) | |
tree | adb9937e718b731c72b05ab341ea4ed613a25ef8 /activesupport | |
parent | af7fc660e5a952eb76b9e9b211d63fa317c4bf07 (diff) | |
download | rails-9e82ffcadac1860d5b835035e4dc4490ef6ed791.tar.gz rails-9e82ffcadac1860d5b835035e4dc4490ef6ed791.tar.bz2 rails-9e82ffcadac1860d5b835035e4dc4490ef6ed791.zip |
use define_singleton_method instead of class_eval
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/per_thread_registry.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/per_thread_registry.rb b/activesupport/lib/active_support/per_thread_registry.rb index e9499600a4..aa682fb36c 100644 --- a/activesupport/lib/active_support/per_thread_registry.rb +++ b/activesupport/lib/active_support/per_thread_registry.rb @@ -36,10 +36,8 @@ module ActiveSupport def method_missing(name, *args, &block) # :nodoc: # Caches the method definition as a singleton method of the receiver. - singleton_class.class_eval do - define_method(name) do |*a, &b| - per_thread_registry_instance.public_send(name, *a, &b) - end + define_singleton_method(name) do |*a, &b| + per_thread_registry_instance.public_send(name, *a, &b) end send(name, *args, &block) |