about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-02-03 22:56:06 +0000
committerEric Wong <e@80x24.org>2017-02-03 22:56:06 +0000
commita270f2d2f80d28a9c3f46b652ca222e80e130968 (patch)
tree9f5efc0acb63e578af70c9147e2466dee2c84776
parentbb7783770314f720fc39ae9eac4fd7313ae5bbbb (diff)
downloadmogilefs-client-a270f2d2f80d28a9c3f46b652ca222e80e130968.tar.gz
On reading more carefully, it seems this change is from
r34847 which landed in Ruby 2.0.  So we still need to support
Ruby 2.0 and 2.1 users.
-rw-r--r--lib/mogilefs/socket_common.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mogilefs/socket_common.rb b/lib/mogilefs/socket_common.rb
index 886c738..212f5da 100644
--- a/lib/mogilefs/socket_common.rb
+++ b/lib/mogilefs/socket_common.rb
@@ -58,9 +58,10 @@ module MogileFS::SocketCommon
 
   # Workaround for https://bugs.ruby-lang.org/issues/13085
   # (excessive garbage from IO#write)
-  # This looks like it will be fixed in Ruby 2.5 final.
+  # This regression was introduced in Ruby 2.0 (r34847)
+  # and 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.4
+     RUBY_VERSION.to_f >= 2.0 && 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.