From b1a55238f3ac510b535490e8ccdef65dfc351ecf Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sun, 25 Jul 2010 16:42:18 -0700 Subject: fixing warnings --- lib/arel/algebra/relations/operations/having.rb | 1 - lib/arel/algebra/relations/operations/lock.rb | 2 +- lib/arel/algebra/relations/utilities/compound.rb | 2 +- lib/arel/engines/memory/relations/array.rb | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/arel') diff --git a/lib/arel/algebra/relations/operations/having.rb b/lib/arel/algebra/relations/operations/having.rb index a1bbbb3bdc..daca1f7bce 100644 --- a/lib/arel/algebra/relations/operations/having.rb +++ b/lib/arel/algebra/relations/operations/having.rb @@ -2,7 +2,6 @@ module Arel class Having < Compound attributes :relation, :predicates deriving :== - requires :restricting def initialize(relation, *predicates) predicates = [yield(relation)] + predicates if block_given? diff --git a/lib/arel/algebra/relations/operations/lock.rb b/lib/arel/algebra/relations/operations/lock.rb index 2da273cebc..4520fd668b 100644 --- a/lib/arel/algebra/relations/operations/lock.rb +++ b/lib/arel/algebra/relations/operations/lock.rb @@ -1,7 +1,7 @@ module Arel class Lock < Compound attributes :relation, :locked - deriving :initialize, :== + deriving :== def initialize(relation, locked) @relation = relation diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb index 42ac519907..34f80b9e56 100644 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ b/lib/arel/algebra/relations/utilities/compound.rb @@ -4,7 +4,7 @@ module Arel attr_reader :relation delegate :joins, :join?, :inserts, :taken, :skipped, :name, :externalizable?, - :column_for, :engine, :sources, :locked, :table_alias, + :column_for, :sources, :locked, :table_alias, :to => :relation def self.requires(feature = nil) diff --git a/lib/arel/engines/memory/relations/array.rb b/lib/arel/engines/memory/relations/array.rb index d8751fa626..9f69618186 100644 --- a/lib/arel/engines/memory/relations/array.rb +++ b/lib/arel/engines/memory/relations/array.rb @@ -4,7 +4,7 @@ module Arel attributes :array, :attribute_names_and_types include Recursion::BaseCase - deriving :==, :initialize + deriving :== def initialize(array, attribute_names_and_types) @array, @attribute_names_and_types = array, attribute_names_and_types -- cgit v1.2.3