aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-11-21 00:43:28 +0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-24 01:37:01 +0800
commit6ffe0ef55bbabf59a533402a6420942c7397e441 (patch)
treecc6a610b909ee314d45f2be4b6d0c043351941ab /activerecord
parent63c9185b62076f416c63b472a356bf9faac143db (diff)
downloadrails-6ffe0ef55bbabf59a533402a6420942c7397e441.tar.gz
rails-6ffe0ef55bbabf59a533402a6420942c7397e441.tar.bz2
rails-6ffe0ef55bbabf59a533402a6420942c7397e441.zip
Avoid creating local var.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
index 5ca1923d89..c2cd9e8d5e 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
@@ -40,8 +40,7 @@ module ActiveRecord
if @connection.respond_to?(:encoding)
@connection.encoding.to_s
else
- encoding = @connection.execute('PRAGMA encoding')
- encoding[0]['encoding']
+ @connection.execute('PRAGMA encoding')[0]['encoding']
end
end