From 206ec83ced0097a97f431a8fe20d4fcbd8fdd4d5 Mon Sep 17 00:00:00 2001 From: Raimonds Simanovskis Date: Tue, 16 Nov 2010 13:53:06 +0200 Subject: small additional fix for order_hacks method for Oracle --- lib/arel/visitors/oracle.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/arel/visitors/oracle.rb b/lib/arel/visitors/oracle.rb index 00572213e6..ecb157f8bc 100644 --- a/lib/arel/visitors/oracle.rb +++ b/lib/arel/visitors/oracle.rb @@ -96,8 +96,12 @@ module Arel array = [] i = 0 string.split(',').each do |part| - array[i] ||= "" - array[i] << part + if array[i] + array[i] << ',' << part + else + # to ensure that array[i] will be String and not Arel::Nodes::SqlLiteral + array[i] = '' << part + end i += 1 if array[i].count('(') == array[i].count(')') end array -- cgit v1.2.3