Ruby mogilefs-client dev/users discussion/patches/bugs/help/...
 help / color / Atom feed
* [PATCH] socket_common: limit IO#write garbage workaround to <= 2.4
@ 2017-01-30 20:20 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-01-30 20:20 UTC (permalink / raw)
  To: mogilefs-client-public

It looks like this regression will be fixed in time for
Ruby 2.5.
---
 lib/mogilefs/socket_common.rb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/mogilefs/socket_common.rb b/lib/mogilefs/socket_common.rb
index 9383731..d430068 100644
--- a/lib/mogilefs/socket_common.rb
+++ b/lib/mogilefs/socket_common.rb
@@ -57,12 +57,11 @@ def readpartial(size, buf = "", timeout = 5)
     timed_read(size, buf, timeout) or raise EOFError, "end of file reached"
   end
 
-  # workaround for https://bugs.ruby-lang.org/issues/13085
+  # Workaround for https://bugs.ruby-lang.org/issues/13085
   # (excessive garbage from IO#write)
-  # XXX maybe this can be fixed for Ruby 2.5 final, but maybe not:
-  # Update this when Ruby 2.5 is released on 2017-12-25
+  # This looks like it will be fixed in Ruby 2.5 final.
   if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby' &&
-     RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.5
+     RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.4
     def write(buf)
       # Blocking TCP writes would error out long before one day,
       # and MogileFS won't allow file creations which take over a day.
-- 
EW


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 20:20 [PATCH] socket_common: limit IO#write garbage workaround to <= 2.4 Eric Wong

Ruby mogilefs-client dev/users discussion/patches/bugs/help/...

Archives are clonable:
	git clone --mirror https://yhbt.net/mogilefs-client-public
	git clone --mirror http://ou63pmih66umazou.onion/mogilefs-client-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.file-systems.mogilefs.ruby
	nntp://ou63pmih66umazou.onion/inbox.comp.file-systems.mogilefs.ruby

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git