From c67ebf96edc8ca691dfc556d4813fed242fe77ca Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 5 Sep 2023 09:14:11 +0000 Subject: [RFC 3/3] update dependency to Ruby 2.5+ We actually need Ruby 2.3+ for `accept_nonblock(exception: false)'; and (AFAIK) we can't easily use a subclass of `Socket' while using Socket#accept_nonblock to inject WriteSplat support for `IO#write(*multi_args)' So just depend on Ruby 2.5+ since all my Ruby is already on the already-ancient Ruby 2.7+ anyways. --- HACKING | 2 +- README | 2 +- lib/unicorn/write_splat.rb | 7 ------- t/README | 2 +- unicorn.gemspec | 4 ++-- 5 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 lib/unicorn/write_splat.rb diff --git a/HACKING b/HACKING index 020209e..5aca83e 100644 --- a/HACKING +++ b/HACKING @@ -60,7 +60,7 @@ becomes unavailable. === Ruby/C Compatibility -We target C Ruby 2.0 and later. We need the Ruby +We target C Ruby 2.5 and later. We need the Ruby implementation to support fork, exec, pipe, UNIX signals, access to integer file descriptors and ability to use unlinked files. diff --git a/README b/README index 5411003..7e29daf 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ both the the request and response in between unicorn and slow clients. cut out everything that is better supported by the operating system, {nginx}[https://nginx.org/] or {Rack}[https://rack.github.io/]. -* Compatible with Ruby 2.0.0 and later. +* Compatible with Ruby 2.5 and later. * Process management: unicorn will reap and restart workers that die from broken apps. There is no need to manage multiple processes diff --git a/lib/unicorn/write_splat.rb b/lib/unicorn/write_splat.rb deleted file mode 100644 index 7e6e363..0000000 --- a/lib/unicorn/write_splat.rb +++ /dev/null @@ -1,7 +0,0 @@ -# -*- encoding: binary -*- -# compatibility module for Ruby <= 2.4, remove when we go Ruby 2.5+ -module Unicorn::WriteSplat # :nodoc: - def write(*arg) # :nodoc: - super(arg.join('')) - end -end diff --git a/t/README b/t/README index d09c715..7bd093d 100644 --- a/t/README +++ b/t/README @@ -14,7 +14,7 @@ Old tests are in Bourne shell and slowly being ported to Perl 5. == Requirements -* {Ruby 2.0.0+}[https://www.ruby-lang.org/en/] +* {Ruby 2.5.0+}[https://www.ruby-lang.org/en/] * {Perl 5.14+}[https://www.perl.org/] # your distro should have it * {GNU make}[https://www.gnu.org/software/make/] * {curl}[https://curl.haxx.se/] diff --git a/unicorn.gemspec b/unicorn.gemspec index 85183d9..e7e3ef7 100644 --- a/unicorn.gemspec +++ b/unicorn.gemspec @@ -25,11 +25,11 @@ s.homepage = 'https://yhbt.net/unicorn/' s.test_files = test_files - # 2.0.0 is the minimum supported version. We don't specify + # 2.5.0 is the minimum supported version. We don't specify # a maximum version to make it easier to test pre-releases, # but we do warn users if they install unicorn on an untested # version in extconf.rb - s.required_ruby_version = ">= 2.0.0" + s.required_ruby_version = ">= 2.5.0" # We do not have a hard dependency on rack, it's possible to load # things which respond to #call. HTTP status lines in responses