diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-03-24 16:26:09 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-03-24 16:26:09 -0700 |
commit | 93d72131bcc24ccb5536bec672d2dac94f8de651 (patch) | |
tree | b0bddcce28817906b483c8f73c574d350ac844c4 /lib/arel/predications.rb | |
parent | 24995298face1d08ffb52f6c1b0374feeb7a380b (diff) | |
download | rails-93d72131bcc24ccb5536bec672d2dac94f8de651.tar.gz rails-93d72131bcc24ccb5536bec672d2dac94f8de651.tar.bz2 rails-93d72131bcc24ccb5536bec672d2dac94f8de651.zip |
add the casting node to the AST at build time
If we add the casting node to the ast at build time, then we can avoid
doing the lookup at visit time.
Diffstat (limited to 'lib/arel/predications.rb')
-rw-r--r-- | lib/arel/predications.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/arel/predications.rb b/lib/arel/predications.rb index c485de07e3..fb98f0a383 100644 --- a/lib/arel/predications.rb +++ b/lib/arel/predications.rb @@ -13,7 +13,7 @@ module Arel end def eq other - Nodes::Equality.new self, other + Nodes::Equality.new self, Nodes.build_quoted(other, self) end def eq_any others @@ -21,7 +21,7 @@ module Arel end def eq_all others - grouping_all :eq, others + grouping_all :eq, others.map { |x| Nodes.build_quoted(x, self) } end def in other @@ -93,7 +93,7 @@ module Arel end def matches other - Nodes::Matches.new self, other + Nodes::Matches.new self, Nodes.build_quoted(other, self) end def matches_any others @@ -105,7 +105,7 @@ module Arel end def does_not_match other - Nodes::DoesNotMatch.new self, other + Nodes::DoesNotMatch.new self, Nodes.build_quoted(other, self) end def does_not_match_any others |