From: Eric Wong <e@80x24.org>
To: mogilefs-client-public@bogomips.org
Subject: [PATCH] socket_common: limit IO#write garbage workaround to <= 2.4
Date: Mon, 30 Jan 2017 20:20:34 +0000 [thread overview]
Message-ID: <20170130202034.29242-1-e@80x24.org> (raw)
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
reply other threads:[~2017-01-30 20:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/mogilefs-client/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170130202034.29242-1-e@80x24.org \
--to=e@80x24.org \
--cc=mogilefs-client-public@bogomips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/mogilefs-client.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).