diff options
author | Stefan Rusterholz <contact@apeiros.me> | 2012-10-28 18:55:36 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-10-28 18:55:36 -0500 |
commit | b5133d018fb0cd0fabc828ec028a2f081c34bcca (patch) | |
tree | 74340d4c31cba9fc36d4b0a11427f19f0855fe20 /activerecord/lib/active_record | |
parent | 852e376a5199ff700ec95d1ac916f4509f48e85e (diff) | |
download | rails-b5133d018fb0cd0fabc828ec028a2f081c34bcca.tar.gz rails-b5133d018fb0cd0fabc828ec028a2f081c34bcca.tar.bz2 rails-b5133d018fb0cd0fabc828ec028a2f081c34bcca.zip |
SQLite3Adapter#type_cast should not mutate arguments
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index c5a859475f..b89e9a01a8 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -251,7 +251,7 @@ module ActiveRecord value = super if column.type == :string && value.encoding == Encoding::ASCII_8BIT logger.error "Binary data inserted for `string` type on column `#{column.name}`" if logger - value.encode! 'utf-8' + value = value.encode Encoding::UTF_8 end value end |