kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] kgio 2.11.3 - deprecated project moves off deprecated TLD
@ 2020-01-08  9:29  5% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2020-01-08  9:29 UTC (permalink / raw)
  To: kgio-public

This is a legacy project, do not use it for new projects.  Ruby
2.3 and later should make this obsolete.  kgio provides
non-blocking I/O methods for Ruby without raising exceptions on
EAGAIN and EINPROGRESS.

Note: I do not recommend using kgio for future applications, Ruby 2.x
has a lot of the functionality of kgio and Ruby 2.3+ has even more.

* homepage: https://yhbt.net/kgio/
* public mailing list: kgio-public@yhbt.net
* git clone https://yhbt.net/kgio.git
* Atom feed https://yhbt.net/kgio/NEWS.atom.xml
* mail archives: https://yhbt.net/kgio-public/

Changes:

    Some doc and warning fixes for newer Rubies.

    We're no longer on bogomips.org since it's due
    for expiry and I can't pay extortionists for a .org, so
    s/bogomips.org/yhbt.net/ for now, and be prepared to move again
    when extortionists move onto the .net TLD.

          pkg.mk: use --local to "gem install"
          pkg.mk: use dark216 theme for Earth Day 2019
          test: fix warnings with RUBYOPT=-w
          tests: fix unused variable warnings from newer Rubies
          test_connect_fd_leak: do not close socket if non-existent
          test_syssend: avoid warning on cleanup
          build: remove olddoc from the gemspec
          doc: remove private email and outdated gmane archives
          doc: move from bogomips.org/kgio to yhbt.net/kgio

Again, using kgio for new projects is strongly discouraged.
Use Ruby 2.3+ instead.

^ permalink raw reply	[relevance 5%]

* [PATCH 1/2] test: fix warnings with RUBYOPT=-w
  2019-10-30  9:26  7% [PATCH 0/2] Ruby warning fixes Eric Wong
@ 2019-10-30  9:26  6% ` Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2019-10-30  9:26 UTC (permalink / raw)
  To: kgio-public

---
 test/lib_read_write.rb    |  2 ++
 test/lib_server_accept.rb | 11 +++++++----
 test/test_tryopen.rb      |  5 +++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/test/lib_read_write.rb b/test/lib_read_write.rb
index 5f70964..a32919f 100644
--- a/test/lib_read_write.rb
+++ b/test/lib_read_write.rb
@@ -166,6 +166,7 @@ module LibReadWriteTest
       rescue EOFError
         break
       rescue => e
+        warn "#{e.message} (#{e.class})"
       end while true
       dig.hexdigest
     end
@@ -203,6 +204,7 @@ module LibReadWriteTest
       rescue EOFError
         break
       rescue => e
+        warn "#{e.message} (#{e.class})"
       end while true
       dig.hexdigest
     end
diff --git a/test/lib_server_accept.rb b/test/lib_server_accept.rb
index db0d120..fcf9c87 100644
--- a/test/lib_server_accept.rb
+++ b/test/lib_server_accept.rb
@@ -20,6 +20,7 @@ module LibServerAccept
     b = @srv.kgio_tryaccept
     assert_kind_of Kgio::Socket, b
     assert_equal @host, b.kgio_addr
+    a.close
   end
 
   def test_tryaccept_flags
@@ -28,6 +29,7 @@ module LibServerAccept
     b = @srv.kgio_tryaccept nil, 0
     assert_kind_of Kgio::Socket, b
     assert_equal 0, b.fcntl(Fcntl::F_GETFD)
+    a.close
   end
 
   def test_blocking_accept_flags
@@ -36,6 +38,7 @@ module LibServerAccept
     b = @srv.kgio_accept nil, 0
     assert_kind_of Kgio::Socket, b
     assert_equal 0, b.fcntl(Fcntl::F_GETFD)
+    a.close
   end
 
   def test_tryaccept_fail
@@ -44,7 +47,7 @@ module LibServerAccept
 
   def test_blocking_accept
     t0 = Time.now
-    pid = fork { sleep 1; a = client_connect; sleep }
+    pid = fork { sleep 1; a = client_connect; sleep; a.close }
     b = @srv.kgio_accept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
@@ -57,7 +60,7 @@ module LibServerAccept
   def test_blocking_accept_with_nonblock_socket
     @srv.nonblock = true
     t0 = Time.now
-    pid = fork { sleep 1; a = client_connect; sleep }
+    pid = fork { sleep 1; a = client_connect; sleep; a.close }
     b = @srv.kgio_accept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
@@ -67,7 +70,7 @@ module LibServerAccept
     assert elapsed >= 1, "elapsed: #{elapsed}"
 
     t0 = Time.now
-    pid = fork { sleep 6; a = client_connect; sleep }
+    pid = fork { sleep 6; a = client_connect; sleep; a.close }
     b = @srv.kgio_accept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
@@ -77,7 +80,7 @@ module LibServerAccept
     assert elapsed >= 6, "elapsed: #{elapsed}"
 
     t0 = Time.now
-    pid = fork { sleep 1; a = client_connect; sleep }
+    pid = fork { sleep 1; a = client_connect; sleep; a.close }
     b = @srv.kgio_accept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
diff --git a/test/test_tryopen.rb b/test/test_tryopen.rb
index abcbd37..2bbbc51 100644
--- a/test/test_tryopen.rb
+++ b/test/test_tryopen.rb
@@ -59,8 +59,9 @@ class TestTryopen < Test::Unit::TestCase
     tmp.close!
     file = Kgio::File.tryopen(path, IO::RDWR|IO::CREAT, 0000)
     assert_equal 0100000, File.stat(path).mode
-    ensure
-      File.unlink path
+    file.close
+  ensure
+    File.unlink path
   end
 
   require "benchmark"

^ permalink raw reply related	[relevance 6%]

* [PATCH 0/2] Ruby warning fixes
@ 2019-10-30  9:26  7% Eric Wong
  2019-10-30  9:26  6% ` [PATCH 1/2] test: fix warnings with RUBYOPT=-w Eric Wong
  0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2019-10-30  9:26 UTC (permalink / raw)
  To: kgio-public

Newer Rubies warn about more things

Eric Wong (2):
  test: fix warnings with RUBYOPT=-w
  tests: fix unused variable warnings from newer Rubies

 test/lib_read_write.rb                     |  2 ++
 test/lib_server_accept.rb                  | 11 +++++++----
 test/test_accept_class.rb                  | 18 ++++++++++--------
 test/test_connect_fd_leak.rb               |  1 +
 test/test_kgio_addr.rb                     |  1 +
 test/test_poll.rb                          | 10 ++++------
 test/test_tcp6_client_read_server_write.rb |  1 +
 test/test_tryopen.rb                       |  5 +++--
 8 files changed, 29 insertions(+), 20 deletions(-)


^ permalink raw reply	[relevance 7%]

Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-10-30  9:26  7% [PATCH 0/2] Ruby warning fixes Eric Wong
2019-10-30  9:26  6% ` [PATCH 1/2] test: fix warnings with RUBYOPT=-w Eric Wong
2020-01-08  9:29  5% [ANN] kgio 2.11.3 - deprecated project moves off deprecated TLD Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kgio.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).