diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-18 16:47:55 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-18 16:47:55 -0700 |
commit | 7feff4e7b52fbef356426d22257af161704315ad (patch) | |
tree | db907c2bc27dc406d08513d40f8e75cd810a91f9 /lib/arel/primitives | |
parent | 32ad530b825f4cdac51e579306548ca695471039 (diff) | |
download | rails-7feff4e7b52fbef356426d22257af161704315ad.tar.gz rails-7feff4e7b52fbef356426d22257af161704315ad.tar.bz2 rails-7feff4e7b52fbef356426d22257af161704315ad.zip |
performance enhancements
Diffstat (limited to 'lib/arel/primitives')
-rw-r--r-- | lib/arel/primitives/attribute.rb | 10 | ||||
-rw-r--r-- | lib/arel/primitives/expression.rb | 10 | ||||
-rw-r--r-- | lib/arel/primitives/value.rb | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/arel/primitives/attribute.rb b/lib/arel/primitives/attribute.rb index 011b751a1d..ca1d31ffcf 100644 --- a/lib/arel/primitives/attribute.rb +++ b/lib/arel/primitives/attribute.rb @@ -30,11 +30,11 @@ module Arel end def ==(other) - Attribute == other.class and - name == other.name and - @alias == other.alias and - ancestor == other.ancestor and - relation == other.relation + Attribute === other and + name == other.name and + @alias == other.alias and + ancestor == other.ancestor and + relation == other.relation end def original_relation diff --git a/lib/arel/primitives/expression.rb b/lib/arel/primitives/expression.rb index 696e3521be..9afafcce2f 100644 --- a/lib/arel/primitives/expression.rb +++ b/lib/arel/primitives/expression.rb @@ -17,11 +17,11 @@ module Arel end def ==(other) - Expression == other.class and - attribute == other.attribute and - function_sql == other.function_sql and - ancestor == other.ancestor and - @alias == other.alias + Expression === other and + attribute == other.attribute and + function_sql == other.function_sql and + ancestor == other.ancestor and + @alias == other.alias end module Transformations diff --git a/lib/arel/primitives/value.rb b/lib/arel/primitives/value.rb index b4bddd0b0c..4509f13d17 100644 --- a/lib/arel/primitives/value.rb +++ b/lib/arel/primitives/value.rb @@ -17,8 +17,8 @@ module Arel end def ==(other) - Value == other.class and - value == other.value + Value === other and + value == other.value end def bind(relation) |