warning: URI.regexp is obsolete

Issue #286 resolved
Tomas Volf created an issue

I'm getting following warning

/home/wolf/.rvm/gems/ruby-2.5.3@sm-toolkit/gems/pg-1.1.3/lib/pg/connection.rb:50: warning: URI.regexp is obsolete

when running my code with $VERBOSE = true. Simplest repro steps:

#!/usr/bin/ruby

require 'pg'

$VERBOSE = true

PG::Connection.open('host=foo')

will output

+:( $ bundle exec ./repro.rb
/home/wolf/.rvm/gems/ruby-2.5.3@sm-toolkit/gems/pg-1.1.3/lib/pg/connection.rb:50: warning: URI.regexp is obsolete
Traceback (most recent call last):
        2: from ./repro.rb:7:in `<main>'
        1: from ./repro.rb:7:in `new'
./repro.rb:7:in `initialize': could not translate host name "foo" to address: No address associated with hostname (PG::ConnectionBad)