aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-27 18:01:59 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-27 18:01:59 -0700
commitb2ee120f56fa7e0205b2d3fc602b6ad68a438ac9 (patch)
tree111e716aad507ae8ad7205a134f7c033a6eec61b
parentc0cadc86e054f2c2eead3482d54cbc57e3828671 (diff)
downloadrails-b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9.tar.gz
rails-b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9.tar.bz2
rails-b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9.zip
PERF: never called with a block, so no need to test
-rw-r--r--lib/arel/algebra/relations/operations/project.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/arel/algebra/relations/operations/project.rb b/lib/arel/algebra/relations/operations/project.rb
index daca742039..8136f7ce9b 100644
--- a/lib/arel/algebra/relations/operations/project.rb
+++ b/lib/arel/algebra/relations/operations/project.rb
@@ -2,10 +2,9 @@ module Arel
class Project < Compound
attr_reader :projections
- def initialize(relation, *projections, &block)
+ def initialize(relation, *projections)
super(relation)
- @projections = (projections + arguments_from_block(relation, &block)) \
- .collect { |p| p.bind(relation) }
+ @projections = projections.collect { |p| p.bind(relation) }
end
def attributes