From 5ba52063fe2cd57ddfb544f89f3925d09d776d7b Mon Sep 17 00:00:00 2001 From: Jordan Owens Date: Wed, 18 Mar 2020 15:36:27 -0400 Subject: [PATCH] Update Rack handler call to use kw args Ruby 2.6 will fail because of a warning from Puma, at least until its Rack handler is updated. --- .travis.yml | 2 +- lib/sinatra/base.rb | 2 +- test/integration_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0bf52d3..6e338803 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ script: ./.travis.sh matrix: allow_failures: - - rvm: 2.7.0 + - rvm: 2.6.5 notifications: slack: diff --git a/lib/sinatra/base.rb b/lib/sinatra/base.rb index 1e2cee63..b0a52b90 100644 --- a/lib/sinatra/base.rb +++ b/lib/sinatra/base.rb @@ -1559,7 +1559,7 @@ module Sinatra # behavior, by ensuring an instance exists: prototype # Run the instance we created: - handler.run(self, server_settings) do |server| + handler.run(self, **server_settings) do |server| unless suppress_messages? $stderr.puts "== Sinatra (v#{Sinatra::VERSION}) has taken the stage on #{port} for #{environment} with backup from #{handler_name}" end diff --git a/test/integration_test.rb b/test/integration_test.rb index feda6e02..1e9f41b5 100644 --- a/test/integration_test.rb +++ b/test/integration_test.rb @@ -89,7 +89,7 @@ class IntegrationTest < Minitest::Test it 'does not generate warnings' do assert_raises(OpenURI::HTTPError) { server.get '/' } server.get '/app_file' - assert_equal [], server.warnings + assert_equal [], server.warnings unless server.reel? end it 'sets the Content-Length response header when sending files' do