Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't reassign array in ToSql#visit_Arel_Nodes_NotIn

  • Loading branch information...
commit c3bfbecff4e38eeeb6ecdf9886222097396fd8e9 1 parent c308de8
@ernie ernie authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/arel/visitors/to_sql.rb
View
5 lib/arel/visitors/to_sql.rb
@@ -202,8 +202,9 @@ def visit_Arel_Nodes_In o
def visit_Arel_Nodes_NotIn o
right = o.right
- right = right.empty? ? 'NULL' : right.map { |x| visit x }.join(', ')
- "#{visit o.left} NOT IN (#{right})"
+ "#{visit o.left} NOT IN (#{
+ right.empty? ? 'NULL' : right.map { |x| visit x }.join(', ')
+ })"
end
def visit_Arel_Nodes_And o
Please sign in to comment.
Something went wrong with that request. Please try again.