diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-27 18:01:59 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-27 18:01:59 -0700 |
commit | b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9 (patch) | |
tree | 111e716aad507ae8ad7205a134f7c033a6eec61b /lib/arel | |
parent | c0cadc86e054f2c2eead3482d54cbc57e3828671 (diff) | |
download | rails-b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9.tar.gz rails-b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9.tar.bz2 rails-b2ee120f56fa7e0205b2d3fc602b6ad68a438ac9.zip |
PERF: never called with a block, so no need to test
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/algebra/relations/operations/project.rb | 5 |
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 |