From 7619bcf2d4a348cb48b765e1980e935abbcc694f Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 30 Jan 2012 13:13:04 -0800 Subject: rewrites a couple of alternations in regexps as character classes Character classes are the specific regexp construct to express alternation of individual characters. --- activerecord/lib/active_record/relation/calculations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index bf9b4bf1c9..6bf3050af9 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -333,7 +333,7 @@ module ActiveRecord def select_for_count if @select_values.present? select = @select_values.join(", ") - select if select !~ /(,|\*)/ + select if select !~ /[,*]/ end end -- cgit v1.2.3