Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix for issue #223. Handle situation where windows is nil. #225

Open
wants to merge 1 commit into from

3 participants

@robdimarco

I modified the check on the windows array to handle the situation that was nil. This was causing breakage for me in when trying to use 3.0.3

@tenderlove
Owner

How is the windows array being set to nil? It is initialized to [] here.

@robdimarco

I'm not sure exactly and would have to look to find a stacktrace. My hunch is that it was through some other code setting the windows instance variable through the attr_accessor.

@tamird

3-0-stable is no longer maintained, correct? let's close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/arel/visitors/to_sql.rb
View
2  lib/arel/visitors/to_sql.rb
@@ -136,7 +136,7 @@ def visit_Arel_Nodes_SelectCore o
("WHERE #{o.wheres.map { |x| visit x }.join ' AND ' }" unless o.wheres.empty?),
("GROUP BY #{o.groups.map { |x| visit x }.join ', ' }" unless o.groups.empty?),
(visit(o.having) if o.having),
- ("WINDOW #{o.windows.map { |x| visit x }.join ', ' }" unless o.windows.empty?)
+ ("WINDOW #{o.windows.map { |x| visit x }.join ', ' }" unless Array(o.windows).empty?)
].compact.join ' '
end
Something went wrong with that request. Please try again.