aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/relations/row.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/algebra/relations/row.rb')
-rw-r--r--lib/arel/algebra/relations/row.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/arel/algebra/relations/row.rb b/lib/arel/algebra/relations/row.rb
index f303dcd8d1..84f19e372f 100644
--- a/lib/arel/algebra/relations/row.rb
+++ b/lib/arel/algebra/relations/row.rb
@@ -12,10 +12,9 @@ module Arel
end
def slice(*attributes)
- Row.new(relation, attributes.inject([]) do |cheese, attribute|
+ Row.new(relation, attributes.map do |attribute|
# FIXME TESTME method chaining
- cheese << tuple[relation.relation.position_of(attribute)]
- cheese
+ tuple[relation.relation.position_of(attribute)]
end)
end