From 807e63b511c018228d9c1681adc02c9900f70631 Mon Sep 17 00:00:00 2001 From: "Clifford T. Matthews" Date: Tue, 23 Feb 2016 15:20:54 -0700 Subject: Removes potentially quadratic Regexp from ActiveRecord::LogSubscriber#sql_color --- activerecord/lib/active_record/log_subscriber.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index b63caa4473..efa2a4df02 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -67,7 +67,7 @@ module ActiveRecord case sql when /\A\s*rollback/mi RED - when /\s*.*?select .*for update/mi, /\A\s*lock/mi + when /select .*for update/mi, /\A\s*lock/mi WHITE when /\A\s*select/i BLUE -- cgit v1.2.3