lib/database_url.rb in database_url-0.1.0 vs lib/database_url.rb in database_url-0.1.1
- old
+ new
@@ -40,10 +40,10 @@
memo[:user] = uri.user
end
if uri.password
memo[:password] = uri.password
end
- query = CGI.parse uri.query
+ query = CGI.parse uri.query.to_s
if query.has_key?('encoding')
memo[:encoding] = query['encoding'][0]
end
if (pool = query['pool'] || query['max_connections']) and pool.length > 0 # CGI.parse creates a Hash that defaults to []
memo[field_map.fetch('pool').to_sym] = pool[0].to_i