diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-25 18:25:47 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-25 18:25:47 -0700 |
commit | bc4d913200d17da751f9b1d9bad78cb94173a4cb (patch) | |
tree | 8e5ca7ca083ff77dcac773c78b74ea8c52305826 /lib/arel/algebra | |
parent | a20bd2cbd19120d821e85b929fd57ea75a916c75 (diff) | |
download | rails-bc4d913200d17da751f9b1d9bad78cb94173a4cb.tar.gz rails-bc4d913200d17da751f9b1d9bad78cb94173a4cb.tar.bz2 rails-bc4d913200d17da751f9b1d9bad78cb94173a4cb.zip |
do not use a module as it slows down method lookup
Diffstat (limited to 'lib/arel/algebra')
-rw-r--r-- | lib/arel/algebra/core_extensions/hash.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/arel/algebra/core_extensions/hash.rb b/lib/arel/algebra/core_extensions/hash.rb index c64225f685..82cd5e11d3 100644 --- a/lib/arel/algebra/core_extensions/hash.rb +++ b/lib/arel/algebra/core_extensions/hash.rb @@ -1,11 +1,7 @@ -module Arel - module HashExtensions - def bind(relation) - inject({}) do |bound, (key, value)| - bound.merge(key.bind(relation) => value.bind(relation)) - end +class Hash + def bind(relation) + inject({}) do |bound, (key, value)| + bound.merge(key.bind(relation) => value.bind(relation)) end - - Hash.send(:include, self) end end |