Permalink
Browse files

1.0.1 fixes

  • Loading branch information...
1 parent 42b1158 commit 9f537d6a3ac30a46f08ea4b8049a61c1f938271b Peter van Hardenberg committed Nov 11, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/hstore/hstore.rb
View
@@ -2,7 +2,8 @@
class Sequel::Postgres::HStore < Hash
def self.quoted_string(scanner)
- key = scanner.scan(/(\\"|[^"])*/).gsub("\\\\", "\\")
+ key = scanner.scan(/(\\"|[^"])*/)
+ key = key.gsub(/\\(.)/, '\1')
scanner.skip(/"/)
key
end
@@ -48,8 +49,7 @@ def initialize(hash)
end
def to_s_escaped(str)
- puts str
- str.to_s.gsub(/\\(?!")/) {'\\\\'}.gsub(/"/, '\"').gsub(/'/, "''").tap {|s| puts s}
+ str.to_s.gsub(/\\(?!")/) {'\\\\'}.gsub(/"/, '\"').gsub(/'/, "''")
end
def sql_literal(dataset)

0 comments on commit 9f537d6

Please sign in to comment.