From 24f1f822e3e74ba2332d6c9df67806efa5006a3a Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Tue, 20 Aug 2019 15:47:27 +0900 Subject: [PATCH] Giving a Symbol here might be a very little bit efficient than giving a String since the key is goning to be converted to a Symbol later --- activerecord/lib/active_record/core.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 1b2c9c6754..92f44f21c4 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -133,11 +133,11 @@ def self.configurations self.filter_attributes = [] def self.connection_handler - Thread.current.thread_variable_get("ar_connection_handler") || default_connection_handler + Thread.current.thread_variable_get(:ar_connection_handler) || default_connection_handler end def self.connection_handler=(handler) - Thread.current.thread_variable_set("ar_connection_handler", handler) + Thread.current.thread_variable_set(:ar_connection_handler, handler) end self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new -- GitLab