aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index ea2ea98327..337f68ba08 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1866,10 +1866,13 @@ module ActiveRecord #:nodoc:
end
def expand_range_bind_variables(bind_vars) #:nodoc:
- bind_vars.each_with_index do |var, index|
- bind_vars[index, 1] = [var.first, var.last] if var.is_a?(Range)
+ bind_vars.sum do |var|
+ if var.is_a?(Range)
+ [var.first, var.last]
+ else
+ [var]
+ end
end
- bind_vars
end
def quote_bound_value(value) #:nodoc: