aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/per_thread_registry.rb
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2013-04-13 12:14:12 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2013-04-13 12:14:12 -0500
commit9e82ffcadac1860d5b835035e4dc4490ef6ed791 (patch)
treeadb9937e718b731c72b05ab341ea4ed613a25ef8 /activesupport/lib/active_support/per_thread_registry.rb
parentaf7fc660e5a952eb76b9e9b211d63fa317c4bf07 (diff)
downloadrails-9e82ffcadac1860d5b835035e4dc4490ef6ed791.tar.gz
rails-9e82ffcadac1860d5b835035e4dc4490ef6ed791.tar.bz2
rails-9e82ffcadac1860d5b835035e4dc4490ef6ed791.zip
use define_singleton_method instead of class_eval
Diffstat (limited to 'activesupport/lib/active_support/per_thread_registry.rb')
-rw-r--r--activesupport/lib/active_support/per_thread_registry.rb6
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)