aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-01-30 13:13:04 -0800
committerXavier Noria <fxn@hashref.com>2012-01-30 13:13:04 -0800
commit7619bcf2d4a348cb48b765e1980e935abbcc694f (patch)
tree823498f90b5a84d070b892f0e411b06ff3ac4639 /activerecord/lib/active_record
parent211174a3be8554d54f2df140e601b8d39cc89824 (diff)
downloadrails-7619bcf2d4a348cb48b765e1980e935abbcc694f.tar.gz
rails-7619bcf2d4a348cb48b765e1980e935abbcc694f.tar.bz2
rails-7619bcf2d4a348cb48b765e1980e935abbcc694f.zip
rewrites a couple of alternations in regexps as character classes
Character classes are the specific regexp construct to express alternation of individual characters.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/calculations.rb2
1 files changed, 1 insertions, 1 deletions
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