diff options
author | Akira Matsuda <ronnie@dio.jp> | 2011-12-28 14:26:38 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2011-12-28 15:00:27 +0900 |
commit | c8711e4ecd1531db15b6f2d0dbf01fed44904667 (patch) | |
tree | 64f5ccf7a4909279ebefdfca3e71c8a43733e78a /activerecord | |
parent | 1a7701522d2308df801ba1f375cb0626386928a5 (diff) | |
download | rails-c8711e4ecd1531db15b6f2d0dbf01fed44904667.tar.gz rails-c8711e4ecd1531db15b6f2d0dbf01fed44904667.tar.bz2 rails-c8711e4ecd1531db15b6f2d0dbf01fed44904667.zip |
no need to compact an already compacted Array
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index eee198e760..a436f3269e 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -32,7 +32,7 @@ module ActiveRecord if values.empty? array_predicates << attribute.eq(nil) else - array_predicates << attribute.in(values.compact).or(attribute.eq(nil)) + array_predicates << attribute.in(values).or(attribute.eq(nil)) end else array_predicates << attribute.in(values) |