aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorErnie Miller <ernie@metautonomo.us>2010-05-07 09:08:41 -0400
committerErnie Miller <ernie@metautonomo.us>2010-05-07 13:09:13 -0400
commitb11b75096984279a8a8e751ae9158c32bd2312aa (patch)
treea89e460832f3c84dac9c7a6ba14b8e69d57c1e47 /lib
parent6249e5822a105719a09b7ccebc14336f37a8917c (diff)
downloadrails-b11b75096984279a8a8e751ae9158c32bd2312aa.tar.gz
rails-b11b75096984279a8a8e751ae9158c32bd2312aa.tar.bz2
rails-b11b75096984279a8a8e751ae9158c32bd2312aa.zip
Removal of operator overrides
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/algebra/predicates.rb20
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/arel/algebra/predicates.rb b/lib/arel/algebra/predicates.rb
index d789c1d8a2..2de867b779 100644
--- a/lib/arel/algebra/predicates.rb
+++ b/lib/arel/algebra/predicates.rb
@@ -4,35 +4,17 @@ module Arel
def or(other_predicate)
Or.new(self, other_predicate)
end
-
- def |(other_predicate)
- Or.new(self, other_predicate)
- end
def and(other_predicate)
And.new(self, other_predicate)
end
- def &(other_predicate)
- And.new(self, other_predicate)
- end
-
def complement
Not.new(self)
end
def not
- complement
- end
-
- if respond_to?('!') # Nice! We're running Ruby 1.9 and can override the inherited BasicObject#!
- def empty? # Need to define empty? to keep Object#blank? from going haywire
- false
- end
-
- define_method('!') do
- self.complement
- end
+ self.complement
end
end