diff --git a/Gemfile b/Gemfile index 17f58c92..84bdadba 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ unless ENV['PUMA_NO_RUBOCOP'] || RUBY_PLATFORM.include?('mswin') gem 'rubocop-performance', require: false end -if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION +if RUBY_VERSION == '2.4.1' gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"] end diff --git a/ext/puma_http11/extconf.rb b/ext/puma_http11/extconf.rb index bae4d696..031c33ed 100644 --- a/ext/puma_http11/extconf.rb +++ b/ext/puma_http11/extconf.rb @@ -2,7 +2,7 @@ require 'mkmf' dir_config("puma_http11") -if $mingw && RUBY_VERSION >= '2.4' +if $mingw append_cflags '-fstack-protector-strong -D_FORTIFY_SOURCE=2' append_ldflags '-fstack-protector-strong -l:libssp.a' have_library 'ssp' @@ -13,7 +13,7 @@ unless ENV["PUMA_DISABLE_SSL"] has_openssl_dir = dir_config('openssl').any? found_pkg_config = !has_openssl_dir && pkg_config('openssl') - found_ssl = if (!$mingw || RUBY_VERSION >= '2.4') && found_pkg_config + found_ssl = if !$mingw && found_pkg_config puts 'using OpenSSL pkgconfig (openssl.pc)' true elsif have_library('libcrypto', 'BIO_read') && have_library('libssl', 'SSL_CTX_new') diff --git a/test/helper.rb b/test/helper.rb index fc72da06..da5ba4cb 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -2,7 +2,7 @@ # Copyright (c) 2011 Evan Phoenix # Copyright (c) 2005 Zed A. Shaw -if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION +if RUBY_VERSION == '2.4.1' begin require 'stopgap_13632' rescue LoadError diff --git a/test/helpers/integration.rb b/test/helpers/integration.rb index 159420af..c74f969d 100644 --- a/test/helpers/integration.rb +++ b/test/helpers/integration.rb @@ -277,7 +277,6 @@ class TestIntegration < Minitest::Test - file descriptors are not preserved on exec on JRuby; connection reset errors are expected during restarts MSG skip_if :truffleruby, suffix: ' - Undiagnosed failures on TruffleRuby' - skip "Undiagnosed failures on Ruby 2.2" if RUBY_VERSION < '2.3' args = "-w #{workers} -t 0:5 -q test/rackup/hello_with_delay.ru" if Puma.windows? diff --git a/test/test_integration_cluster.rb b/test/test_integration_cluster.rb index d9d369da..7a22aed1 100644 --- a/test/test_integration_cluster.rb +++ b/test/test_integration_cluster.rb @@ -88,7 +88,6 @@ class TestIntegrationCluster < TestIntegration def test_term_closes_listeners_tcp skip_unless_signal_exist? :TERM - skip "Intermittent failure on Ruby 2.2" if RUBY_VERSION < '2.3' term_closes_listeners unix: false end @@ -132,8 +131,6 @@ class TestIntegrationCluster < TestIntegration end def test_term_worker_clean_exit - skip "Intermittent failure on Ruby 2.2" if RUBY_VERSION < '2.3' - cli_server "-w #{workers} test/rackup/hello.ru" # Get the PIDs of the child workers. diff --git a/test/test_puma_server_ssl.rb b/test/test_puma_server_ssl.rb index ef36775d..47677fec 100644 --- a/test/test_puma_server_ssl.rb +++ b/test/test_puma_server_ssl.rb @@ -140,8 +140,7 @@ class TestPumaServerSSL < Minitest::Test skip("SSLv3 protocol is unavailable") if Puma::MiniSSL::OPENSSL_NO_SSL3 start_server @http.ssl_version= :SSLv3 - # Ruby 2.4.5 on Travis raises ArgumentError - assert_raises(OpenSSL::SSL::SSLError, ArgumentError) do + assert_raises(OpenSSL::SSL::SSLError) do @http.start do Net::HTTP::Get.new '/' end @@ -161,8 +160,7 @@ class TestPumaServerSSL < Minitest::Test else @http.ssl_version = :TLSv1 end - # Ruby 2.4.5 on Travis raises ArgumentError - assert_raises(OpenSSL::SSL::SSLError, ArgumentError) do + assert_raises(OpenSSL::SSL::SSLError) do @http.start do Net::HTTP::Get.new '/' end @@ -181,8 +179,7 @@ class TestPumaServerSSL < Minitest::Test else @http.ssl_version = :TLSv1_1 end - # Ruby 2.4.5 on Travis raises ArgumentError - assert_raises(OpenSSL::SSL::SSLError, ArgumentError) do + assert_raises(OpenSSL::SSL::SSLError) do @http.start do Net::HTTP::Get.new '/' end