diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-19 12:49:23 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-03-19 12:49:23 +0000 |
commit | b5e01f3e4a2a7e0d6ae496ccefb82a6b752b7ee6 (patch) | |
tree | 34788e2bc2111d3968b56a8a0554de548c2073f3 /activerecord/lib | |
parent | 65704aeacd1e99273f0910b7599d47fd29d52982 (diff) | |
download | rails-b5e01f3e4a2a7e0d6ae496ccefb82a6b752b7ee6.tar.gz rails-b5e01f3e4a2a7e0d6ae496ccefb82a6b752b7ee6.tar.bz2 rails-b5e01f3e4a2a7e0d6ae496ccefb82a6b752b7ee6.zip |
SQLite: binary escaping works with ='u'. Closes #7862.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6449 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb index da4efd394f..2c4e63b87d 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb @@ -68,7 +68,7 @@ module ActiveRecord class SQLiteColumn < Column #:nodoc: class << self def string_to_binary(value) - value.gsub(/\0|\%/) do |b| + value.gsub(/\0|\%/n) do |b| case b when "\0" then "%00" when "%" then "%25" @@ -77,7 +77,7 @@ module ActiveRecord end def binary_to_string(value) - value.gsub(/%00|%25/) do |b| + value.gsub(/%00|%25/n) do |b| case b when "%00" then "\0" when "%25" then "%" |