lib/pg_conn.rb in pg_conn-0.12.0 vs lib/pg_conn.rb in pg_conn-0.12.1
- old
+ new
@@ -224,11 +224,14 @@
else
super(*args, **opts)
end
end
- # Quote value as an identifier. Value should be a non-nil string
- def quote_identifier(s) = @pg_connection.escape_identifier(s)
+ # Quote value as an identifier. Value should be a non-nil string or a symbol
+ def quote_identifier(s)
+ s = s.to_s if s.is_a?(Symbol)
+ String@pg_connection.escape_identifier(s)
+ end
# Quote the value as a string. Emit 'null' if value is nil
#
# The value can be of any type but is converted to a string using #to_s
# before quoting. This works by default for the regular types Integer,