Skip to content

Commit

Permalink
Merge pull request #456 from jeremyevans/avoid-ruby27-keyword-warning
Browse files Browse the repository at this point in the history
Avoid spurious keyword argument warning on Ruby 2.7
  • Loading branch information
larskanis authored May 28, 2022
2 parents ee77ed4 + 0242f31 commit 2187b13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/pg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def self.version_string( include_buildnum=nil )


### Convenience alias for PG::Connection.new.
def self.connect( *args, **kwargs, &block )
Connection.new( *args, **kwargs, &block )
def self.connect( *args, &block )
Connection.new( *args, &block )
end


Expand Down
4 changes: 2 additions & 2 deletions lib/pg/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,8 @@ class << self
# connection will have its +client_encoding+ set accordingly.
#
# Raises a PG::Error if the connection fails.
def new(*args, **kwargs)
conn = self.connect_start(*args, **kwargs ) or
def new(*args)
conn = self.connect_start(*args) or
raise(PG::Error, "Unable to create a new connection")

raise(PG::ConnectionBad, conn.error_message) if conn.status == PG::CONNECTION_BAD
Expand Down

0 comments on commit 2187b13

Please sign in to comment.