diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-09 16:40:00 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-09 16:40:00 -0200 |
commit | bdb8bc6e8a4ec3b11658935de9ae5d6a06630b81 (patch) | |
tree | b03c85f63684dfe959d7c15a78d150b4a4aedb0b /activerecord | |
parent | 2fd095507c2d48fdd24c8d2d060d1d01168e1d23 (diff) | |
download | rails-bdb8bc6e8a4ec3b11658935de9ae5d6a06630b81.tar.gz rails-bdb8bc6e8a4ec3b11658935de9ae5d6a06630b81.tar.bz2 rails-bdb8bc6e8a4ec3b11658935de9ae5d6a06630b81.zip |
Don't use Active Support where we don't need to
Diffstat (limited to 'activerecord')
3 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index fc37588f09..a690404892 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -491,7 +491,7 @@ module ActiveRecord end begin - stmt.execute(*type_casted_binds.map(&:second)) + stmt.execute(*type_casted_binds.map { |_, val| val }) rescue Mysql::Error => e # Older versions of MySQL leave the prepared statement in a bad # place when an error occurs. To support older mysql versions, we diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 5fd322310f..eecebdb4e5 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -788,7 +788,7 @@ module ActiveRecord } log(sql, name, type_casted_binds, stmt_key) do - @connection.send_query_prepared(stmt_key, type_casted_binds.map(&:second)) + @connection.send_query_prepared(stmt_key, type_casted_binds.map { |_, val| val }) @connection.block @connection.get_last_result end diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index f09178c93b..35a579f29b 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -310,7 +310,7 @@ module ActiveRecord stmt = cache[:stmt] cols = cache[:cols] ||= stmt.columns stmt.reset! - stmt.bind_params type_casted_binds.map(&:second) + stmt.bind_params type_casted_binds.map { |_, val| val } end ActiveRecord::Result.new(cols, stmt.to_a) |