Hello community,

here is the log from the commit of package rubygem-pg for openSUSE:Factory 
checked in at 2019-03-04 09:20:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-pg (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-pg.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-pg"

Mon Mar  4 09:20:47 2019 rev:36 rq:679533 version:1.1.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-pg/rubygem-pg.changes    2018-10-01 
08:16:30.154003041 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-pg.new.28833/rubygem-pg.changes 
2019-03-04 09:20:52.884595516 +0100
@@ -1,0 +2,6 @@
+Mon Jan 14 13:50:51 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to version 1.1.4
+ see installed ChangeLog
+
+-------------------------------------------------------------------

Old:
----
  pg-1.1.3.gem

New:
----
  pg-1.1.4.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-pg.spec ++++++
--- /var/tmp/diff_new_pack.aeUt40/_old  2019-03-04 09:20:54.456595233 +0100
+++ /var/tmp/diff_new_pack.aeUt40/_new  2019-03-04 09:20:54.456595233 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-pg
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-pg
-Version:        1.1.3
+Version:        1.1.4
 Release:        0
 %define mod_name pg
 %define mod_full_name %{mod_name}-%{version}

++++++ pg-1.1.3.gem -> pg-1.1.4.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.rdoc new/History.rdoc
--- old/History.rdoc    2018-09-07 02:30:11.000000000 +0200
+++ new/History.rdoc    2019-01-09 17:39:54.000000000 +0100
@@ -1,3 +1,10 @@
+== v1.1.4 [2019-01-08] Michael Granger <[email protected]>
+
+- Fix PG::BinaryDecoder::Timestamp on 32 bit systems. # 284
+- Add new error-codes of PostgreSQL-11.
+- Add ruby-2.6 support for Windows fat binary gems and remove ruby-2.0 and 2.1.
+
+
 == v1.1.3 [2018-09-06] Michael Granger <[email protected]>
 
 - Revert opimization that was sometimes causing EBADF in 
rb_wait_for_single_fd().
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2018-09-07 02:30:11.000000000 +0200
+++ new/Rakefile        2019-01-09 17:39:54.000000000 +0100
@@ -61,7 +61,7 @@
        self.developer 'Lars Kanis', '[email protected]'
 
        self.dependency 'rake-compiler', '~> 1.0', :developer
-       self.dependency 'rake-compiler-dock', ['~> 0.6', '>= 0.6.2'], :developer
+       self.dependency 'rake-compiler-dock', ['~> 0.7.0'], :developer
        self.dependency 'hoe-deveiate', '~> 0.9', :developer
        self.dependency 'hoe-bundler', '~> 1.0', :developer
        self.dependency 'rspec', '~> 3.5', :developer
@@ -184,7 +184,7 @@
 
 desc "Update list of server error codes"
 task :update_error_codes do
-       URL_ERRORCODES_TXT = 
"http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_10_4";
+       URL_ERRORCODES_TXT = 
"http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_11_1";
 
        ERRORCODES_TXT = "ext/errorcodes.txt"
        sh "wget #{URL_ERRORCODES_TXT.inspect} -O #{ERRORCODES_TXT.inspect} || 
curl #{URL_ERRORCODES_TXT.inspect} -o #{ERRORCODES_TXT.inspect}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile.cross new/Rakefile.cross
--- old/Rakefile.cross  2018-09-07 02:30:11.000000000 +0200
+++ new/Rakefile.cross  2019-01-09 17:39:54.000000000 +0100
@@ -29,8 +29,8 @@
                self.host_platform              = toolchain
 
                # Cross-compilation constants
-               self.openssl_version            = ENV['OPENSSL_VERSION'] || 
'1.1.0h'
-               self.postgresql_version         = ENV['POSTGRESQL_VERSION'] || 
'10.4'
+               self.openssl_version            = ENV['OPENSSL_VERSION'] || 
'1.1.1a'
+               self.postgresql_version         = ENV['POSTGRESQL_VERSION'] || 
'11.1'
 
                # Check if symlinks work in the current working directory.
                # This fails, if rake-compiler-dock is running on a Windows box.
@@ -293,6 +293,6 @@
     mkdir ~/.gem &&
     (cp build/gem/gem-*.pem ~/.gem/ || true) &&
     bundle install --local &&
-    rake cross native gem RUBY_CC_VERSION=2.5.0:2.4.0:2.3.0:2.2.2:2.1.6:2.0.0 
MAKE="make -j`nproc`"
+    rake cross native gem MAKE="make -j`nproc`"
   EOT
 end
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ
Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/errorcodes.def new/ext/errorcodes.def
--- old/ext/errorcodes.def      2018-09-07 02:30:11.000000000 +0200
+++ new/ext/errorcodes.def      2019-01-09 17:39:54.000000000 +0100
@@ -187,6 +187,10 @@
   register_error_class( "22023", klass );
 }
 {
+  VALUE klass = define_error_class( "InvalidPrecedingOrFollowingSize", "22" );
+  register_error_class( "22013", klass );
+}
+{
   VALUE klass = define_error_class( "InvalidRegularExpression", "22" );
   register_error_class( "2201B", klass );
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/errorcodes.txt new/ext/errorcodes.txt
--- old/ext/errorcodes.txt      2018-09-07 02:30:11.000000000 +0200
+++ new/ext/errorcodes.txt      2019-01-09 17:39:54.000000000 +0100
@@ -2,7 +2,7 @@
 # errcodes.txt
 #      PostgreSQL error codes
 #
-# Copyright (c) 2003-2017, PostgreSQL Global Development Group
+# Copyright (c) 2003-2018, PostgreSQL Global Development Group
 #
 # This list serves as the basis for generating source files containing error
 # codes. It is kept in a common format to make sure all these source files have
@@ -177,6 +177,7 @@
 22P06    E    ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER                    
nonstandard_use_of_escape_character
 22010    E    ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE                      
invalid_indicator_parameter_value
 22023    E    ERRCODE_INVALID_PARAMETER_VALUE                                
invalid_parameter_value
+22013    E    ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE                    
invalid_preceding_or_following_size
 2201B    E    ERRCODE_INVALID_REGULAR_EXPRESSION                             
invalid_regular_expression
 2201W    E    ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE                      
invalid_row_count_in_limit_clause
 2201X    E    ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE              
invalid_row_count_in_result_offset_clause
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg.h new/ext/pg.h
--- old/ext/pg.h        2018-09-07 02:30:11.000000000 +0200
+++ new/ext/pg.h        2019-01-09 17:39:54.000000000 +0100
@@ -103,6 +103,11 @@
 
        /* enable/disable guessing size of PGresult's allocated memory */
        int guess_result_memsize;
+
+#if defined(_WIN32)
+       /* File descriptor to be used for rb_w32_unwrap_io_handle() */
+       int ruby_sd;
+#endif
 } t_pg_connection;
 
 typedef struct pg_coder t_pg_coder;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_binary_decoder.c new/ext/pg_binary_decoder.c
--- old/ext/pg_binary_decoder.c 2018-09-07 02:30:11.000000000 +0200
+++ new/ext/pg_binary_decoder.c 2019-01-09 17:39:54.000000000 +0100
@@ -1,6 +1,6 @@
 /*
  * pg_column_map.c - PG::ColumnMap class extension
- * $Id: pg_binary_decoder.c,v 5d166a4d0441 2018/07/29 12:03:00 lars $
+ * $Id$
  *
  */
 
@@ -154,7 +154,8 @@
 pg_bin_dec_timestamp(t_pg_coder *conv, const char *val, int len, int tuple, 
int field, int enc_idx)
 {
        int64_t timestamp;
-       struct timespec ts;
+       int64_t sec;
+       int64_t nsec;
        VALUE t;
 
        if( len != sizeof(timestamp) ){
@@ -171,14 +172,17 @@
                default:
                        /* PostgreSQL's timestamp is based on year 2000 and 
Ruby's time is based on 1970.
                         * Adjust the 30 years difference. */
-                       ts.tv_sec = (timestamp / 1000000) + 10957L * 24L * 
3600L;
-                       ts.tv_nsec = (timestamp % 1000000) * 1000;
+                       sec = (timestamp / 1000000) + 10957L * 24L * 3600L;
+                       nsec = (timestamp % 1000000) * 1000;
 
-#if (RUBY_API_VERSION_MAJOR > 2 || (RUBY_API_VERSION_MAJOR == 2 && 
RUBY_API_VERSION_MINOR >= 3)) && defined(NEGATIVE_TIME_T)
+#if (RUBY_API_VERSION_MAJOR > 2 || (RUBY_API_VERSION_MAJOR == 2 && 
RUBY_API_VERSION_MINOR >= 3)) && defined(NEGATIVE_TIME_T) && 
defined(SIZEOF_TIME_T) && SIZEOF_TIME_T >= 8
                        /* Fast path for time conversion */
-                       t = rb_time_timespec_new(&ts, conv->flags & 
PG_CODER_TIMESTAMP_APP_LOCAL ? INT_MAX : INT_MAX-1);
+                       {
+                               struct timespec ts = {sec, nsec};
+                               t = rb_time_timespec_new(&ts, conv->flags & 
PG_CODER_TIMESTAMP_APP_LOCAL ? INT_MAX : INT_MAX-1);
+                       }
 #else
-                       t = rb_funcall(rb_cTime, rb_intern("at"), 2, 
LL2NUM(ts.tv_sec), LL2NUM(ts.tv_nsec / 1000));
+                       t = rb_funcall(rb_cTime, rb_intern("at"), 2, 
LL2NUM(sec), LL2NUM(nsec / 1000));
                        if( !(conv->flags & PG_CODER_TIMESTAMP_APP_LOCAL) ) {
                                t = rb_funcall(t, rb_intern("utc"), 0);
                        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_connection.c new/ext/pg_connection.c
--- old/ext/pg_connection.c     2018-09-07 02:30:11.000000000 +0200
+++ new/ext/pg_connection.c     2019-01-09 17:39:54.000000000 +0100
@@ -1,6 +1,6 @@
 /*
  * pg_connection.c - PG::Connection class extension
- * $Id: pg_connection.c,v b49f54dc755b 2018/09/01 12:52:41 lars $
+ * $Id$
  *
  */
 
@@ -85,8 +85,7 @@
 
        if ( RTEST(socket_io) ) {
 #if defined(_WIN32)
-               int ruby_sd = NUM2INT(rb_funcall( socket_io, 
rb_intern("fileno"), 0 ));
-               if( rb_w32_unwrap_io_handle(ruby_sd) ){
+               if( rb_w32_unwrap_io_handle(this->ruby_sd) ){
                        rb_raise(rb_eConnectionBad, "Could not unwrap win32 
socket handle");
                }
 #endif
@@ -165,6 +164,10 @@
 static void
 pgconn_gc_free( t_pg_connection *this )
 {
+#if defined(_WIN32)
+       if ( RTEST(this->socket_io) )
+               rb_w32_unwrap_io_handle( this->ruby_sd );
+#endif
        if (this->pgconn != NULL)
                PQfinish( this->pgconn );
 
@@ -894,6 +897,7 @@
 
                #ifdef _WIN32
                        ruby_sd = rb_w32_wrap_io_handle((HANDLE)(intptr_t)sd, 
O_RDWR|O_BINARY|O_NOINHERIT);
+                       this->ruby_sd = ruby_sd;
                #else
                        ruby_sd = sd;
                #endif
@@ -961,7 +965,7 @@
  *    conn.exec(sql) {|pg_result| block }
  *
  * Sends SQL query request specified by _sql_ to PostgreSQL.
- * Returns a PG::Result instance on success.
+ * On success, it returns a PG::Result instance with all result rows and 
columns.
  * On failure, it raises a PG::Error.
  *
  * For backward compatibility, if you pass more than one parameter to this 
method,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ext/pg_result.c new/ext/pg_result.c
--- old/ext/pg_result.c 2018-09-07 02:30:11.000000000 +0200
+++ new/ext/pg_result.c 2019-01-09 17:39:54.000000000 +0100
@@ -1,6 +1,6 @@
 /*
  * pg_result.c - PG::Result class extension
- * $Id: pg_result.c,v a8b70c42b3e8 2018/07/30 14:09:38 kanis $
+ * $Id$
  *
  */
 
@@ -419,6 +419,8 @@
  *
  * The class to represent the query result tuples (rows).
  * An instance of this class is created as the result of every query.
+ * All result rows and columns are stored in a memory block attached to the 
PG::Result object.
+ * Whenever a value is accessed it is casted to a Ruby object by the assigned 
#type_map .
  *
  * Since pg-1.1 the amount of memory in use by a PG::Result object is 
estimated and passed to ruby's garbage collector.
  * You can invoke the #clear method to force deallocation of memory of the 
instance when finished with the result for better memory performance.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pg.rb new/lib/pg.rb
--- old/lib/pg.rb       2018-09-07 02:30:11.000000000 +0200
+++ new/lib/pg.rb       2019-01-09 17:39:54.000000000 +0100
@@ -35,7 +35,7 @@
 module PG
 
        # Library version
-       VERSION = '1.1.3'
+       VERSION = '1.1.4'
 
        # VCS revision
        REVISION = %q$Revision: 6f611e78845a $
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2018-09-07 02:30:11.000000000 +0200
+++ new/metadata        2019-01-09 17:39:54.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: pg
 version: !ruby/object:Gem::Version
-  version: 1.1.3
+  version: 1.1.4
 platform: ruby
 authors:
 - Michael Granger
@@ -11,32 +11,31 @@
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fpT3IPN+B
+  vQ66lts4alKC69TE5cuKasWBm+16A4aEe3XdZBRNmtOu/g81gvwA7fkJHKllJuaI
+  dXzdHqq+zbGZVSQ7pRYHYomD0IiDe1DbIouFnPWmagaBnGHwXkDT2bKKP+s2v21m
+  ozilJg4aar2okb/RA6VS87o+d7g6LpDDMMQjH4G9OPnJENLdhu8KnPw/ivSVvQw7
+  N2I4L/ZOIe2DIVuYH7aLHfjZDQv/mNgpAgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYD
+  VR0PBAQDAgSwMB0GA1UdDgQWBBRyjf55EbrHagiRLqt5YAd3yb8k4DAcBgNVHREE
+  FTATgRFnZWRARmFlcmllTVVELm9yZzAcBgNVHRIEFTATgRFnZWRARmFlcmllTVVE
+  Lm9yZzANBgkqhkiG9w0BAQsFAAOCAYEAP9Ffkvg4e8CjIWi8SykQ8oJSS8jbmbgF
+  abke3vXWLG6V9kFiObuJd5wZRBluJANu7bEtjgc3fFaGVP2XxVdCpVjNbmMDg4Qp
+  ovvczP53X6pQP2RSZgxF6Lblvy8y11RziUTVRG/Z2aJHsElo6gI7vQznE/OSDrhC
+  gEhr8uaIUt7D+HZWRbU0+MkKPpL5uMqaFuJbqXEvSwPTuUuYkDfNfsjQO7ruWBac
+  bxHCrvpZ6Tijc0nrlyXi6gPOCLeaqhau2xFnlvKgELwsGYSoKBJyDwqtQ5kwrOlU
+  tkSyLrfZ+RZcH535Hyvif7ZxB0v5OxXXoec+N2vrUsEUMRDL9dg4/WFdN8hIOixF
+  3IPKpZ1ho0Ya5q7yhygtBK9/NBFHw+nbJjcltfPDBXleRe8u73gnQo8AZIhStYSP
+  v4qqqa27Bs468d6SoPxjSm8a2mM9HZ4OdWhq4tFsbTeXDVquCfi64OTEaTt2xQdR
+  JnC4lpJfCP6aCXa5h2XAQfPSH636cQap
   -----END CERTIFICATE-----
-date: 2018-09-07 00:00:00.000000000 Z
+date: 2019-01-09 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: hoe-mercurial
@@ -58,14 +57,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '0.9'
+        version: '0.10'
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '0.9'
+        version: '0.10'
 - !ruby/object:Gem::Dependency
   name: hoe-highline
   requirement: !ruby/object:Gem::Requirement
@@ -100,20 +99,14 @@
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '0.6'
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: 0.6.2
+        version: 0.7.0
   type: :development
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - "~>"
       - !ruby/object:Gem::Version
-        version: '0.6'
-    - - ">="
-      - !ruby/object:Gem::Version
-        version: 0.6.2
+        version: 0.7.0
 - !ruby/object:Gem::Dependency
   name: hoe-bundler
   requirement: !ruby/object:Gem::Requirement
@@ -322,7 +315,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.7.6
+rubygems_version: 2.7.8
 signing_key: 
 specification_version: 4
 summary: Pg is the Ruby interface to the {PostgreSQL 
RDBMS}[http://www.postgresql.org/]
Binary files old/metadata.gz.sig and new/metadata.gz.sig differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/helpers.rb new/spec/helpers.rb
--- old/spec/helpers.rb 2018-09-07 02:30:11.000000000 +0200
+++ new/spec/helpers.rb 2019-01-09 17:39:54.000000000 +0100
@@ -198,8 +198,8 @@
                @test_pgdata = TEST_DIRECTORY + 'data'
                @test_pgdata.mkpath
 
-               @port = 54321
-               ENV['PGPORT'] = @port.to_s
+               ENV['PGPORT'] ||= "54321"
+               @port = ENV['PGPORT'].to_i
                ENV['PGHOST'] = 'localhost'
                @conninfo = "host=localhost port=#{@port} dbname=test"
 
@@ -319,20 +319,19 @@
                return ConnStillUsableMatcher.new
        end
 
-       def wait_for_polling_ok(conn)
-               socket = conn.socket_io
-               status = conn.connect_poll
+       def wait_for_polling_ok(conn, meth = :connect_poll)
+               status = conn.send(meth)
 
                while status != PG::PGRES_POLLING_OK
                        if status == PG::PGRES_POLLING_READING
-                               select( [socket], [], [], 5.0 ) or
+                               select( [conn.socket_io], [], [], 5.0 ) or
                                        raise "Asynchronous connection timed 
out!"
 
                        elsif status == PG::PGRES_POLLING_WRITING
-                               select( [], [socket], [], 5.0 ) or
+                               select( [], [conn.socket_io], [], 5.0 ) or
                                        raise "Asynchronous connection timed 
out!"
                        end
-                       status = conn.connect_poll
+                       status = conn.send(meth)
                end
        end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/pg/basic_type_mapping_spec.rb 
new/spec/pg/basic_type_mapping_spec.rb
--- old/spec/pg/basic_type_mapping_spec.rb      2018-09-07 02:30:11.000000000 
+0200
+++ new/spec/pg/basic_type_mapping_spec.rb      2019-01-09 17:39:54.000000000 
+0100
@@ -62,7 +62,7 @@
                it "should do bigdecimal param encoding" do
                        large = ('123456790'*10) << '.' << ('012345679')
                        res = @conn.exec_params( "SELECT 
$1::numeric,$2::numeric",
-                               [BigDecimal.new('1'), BigDecimal.new(large)], 
nil, basic_type_mapping )
+                               [BigDecimal('1'), BigDecimal(large)], nil, 
basic_type_mapping )
 
                        expect( res.values ).to eq( [
                                        [ "1.0", large ],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/pg/connection_spec.rb 
new/spec/pg/connection_spec.rb
--- old/spec/pg/connection_spec.rb      2018-09-07 02:30:11.000000000 +0200
+++ new/spec/pg/connection_spec.rb      2019-01-09 17:39:54.000000000 +0100
@@ -238,12 +238,27 @@
                        # newly established connection is probably distinct 
from the previous one.
                        ios.each(&:close)
                        conn.reset_start
-                       wait_for_polling_ok(conn)
+                       wait_for_polling_ok(conn, :reset_poll)
 
                        # The new connection should work even when the file 
descriptor has changed.
-                       expect( conn.exec("SELECT 1").values ).to eq([["1"]])
+                       conn.send_query("SELECT 1")
+                       res = wait_for_query_result(conn)
+                       expect( res.values ).to eq([["1"]])
+
                        conn.close
                end
+
+               it "should properly close a socket IO when GC'ed" do
+                       # This results in
+                       #    Errno::ENOTSOCK: An operation was attempted on 
something that is not a socket.
+                       # on Windows when rb_w32_unwrap_io_handle() isn't 
called in pgconn_gc_free().
+                       5.times do
+                               conn = described_class.connect( @conninfo )
+                               conn.socket_io.close
+                       end
+                       GC.start
+                       IO.pipe.each(&:close)
+               end
        end
 
        it "raises proper error when sending fails" do
@@ -264,7 +279,7 @@
                expect( @conn.db ).to eq( "test" )
                expect( @conn.user ).to be_a_kind_of( String )
                expect( @conn.pass ).to eq( "" )
-               expect( @conn.port ).to eq( 54321 )
+               expect( @conn.port ).to eq( @port )
                expect( @conn.tty ).to eq( "" )
                expect( @conn.options ).to eq( "" )
        end
@@ -750,7 +765,7 @@
        it "can return the default connection options as a Hash" do
                expect( described_class.conndefaults_hash ).to be_a( Hash )
                expect( described_class.conndefaults_hash ).to include( :user, 
:password, :dbname, :host, :port )
-               expect( ['5432', '54321'] ).to include( 
described_class.conndefaults_hash[:port] )
+               expect( ['5432', '54321', @port.to_s] ).to include( 
described_class.conndefaults_hash[:port] )
                expect( @conn.conndefaults_hash ).to eq( 
described_class.conndefaults_hash )
        end
 
@@ -1140,8 +1155,16 @@
                        expect( ping ).to eq( PG::PQPING_NO_RESPONSE )
                end
 
-               it "returns correct response when ping connection arguments are 
wrong" do
+               it "returns error when ping connection arguments are wrong" do
                        ping = described_class.ping('localhost', 'localhost', 
nil, nil, :test, nil, nil)
+                       expect( ping ).to_not eq( PG::PQPING_OK )
+               end
+
+               it "returns correct response when ping connection arguments are 
wrong" do
+                       ping = described_class.ping(
+                               :host => 'localhost',
+                               :invalid_option => 9999,
+                               :dbname => :test)
                        expect( ping ).to eq( PG::PQPING_NO_ATTEMPT )
                end
 


Reply via email to