Skip to content

Commit

Permalink
Ruby 1.9: Array#to_s behaves like inspect now, so we don't want to us…
Browse files Browse the repository at this point in the history
…e it here (needs spec!)
  • Loading branch information
brynary committed Nov 10, 2009
1 parent 3dbdaa3 commit 0faeb50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/arel/engines/sql/relations/relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def select_sql
order = order.zip((0...order.size).to_a).map { |s,i| "id_list.alias_#{i} #{'DESC' if s =~ /\bdesc$/i}" }.join(', ')

query = build_query \
"SELECT #{select_clauses.to_s}",
"SELECT #{select_clauses.kind_of?(::Array) ? select_clauses.join("") : select_clauses.to_s}",
"FROM #{table_sql(Sql::TableReference.new(self))}",
(joins(self) unless joins(self).blank? ),
("WHERE #{where_clauses.join("\n\tAND ")}" unless wheres.blank? ),
Expand Down

0 comments on commit 0faeb50

Please sign in to comment.