Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow shared postgresql adapter to work with ruby 1.9 with the -Ku sw…

…itch (Fixes #298)
  • Loading branch information...
commit 3e3816337932dcc0185374bbea1433376d65d23d 1 parent fb91f21
@jeremyevans authored
Showing with 3 additions and 1 deletion.
  1. +2 −0  CHANGELOG
  2. +1 −1  lib/sequel/adapters/shared/postgres.rb
View
2  CHANGELOG
@@ -1,5 +1,7 @@
=== HEAD
+* Allow shared postgresql adapter to work with ruby 1.9 with the -Ku switch (golubev.pavel) (#298)
+
* Add support for connecting to MSSQL via JTDS in the JDBC adapter (jeremyevans)
* Support returning the number of rows updated/deleted on MSSQL when using the ADO adapter with an explicit :provider (jeremyevans)
View
2  lib/sequel/adapters/shared/postgres.rb
@@ -760,7 +760,7 @@ def join_from_sql(type, sql)
# Use a generic blob quoting method, hopefully overridden in one of the subadapter methods
def literal_blob(v)
- "'#{v.gsub(/[\000-\037\047\134\177-\377]/){|b| "\\#{("%o" % b[0..1].unpack("C")[0]).rjust(3, '0')}"}}'"
+ "'#{v.gsub(/[\000-\037\047\134\177-\377]/n){|b| "\\#{("%o" % b[0..1].unpack("C")[0]).rjust(3, '0')}"}}'"
end
# PostgreSQL uses FALSE for false values
Please sign in to comment.
Something went wrong with that request. Please try again.