diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 5fe544c60cc51b58bebf649b0361c86b9ce45a95..a895d1ab186e5e74051c76f1fb2378f902714216 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -113,9 +113,7 @@ def closed? # The underlying body, as a streamable object. attr_reader :stream - # Ruby 2.2 bug https://bugs.ruby-lang.org/issues/10685 prevents - # default_headers from being a keyword argument. - def initialize(status = 200, header = {}, body = [], default_headers = self.class.default_headers) + def initialize(status = 200, header = {}, body = [], default_headers: self.class.default_headers) super() header = merge_default_headers(header, default_headers) diff --git a/actionpack/lib/action_dispatch/testing/test_response.rb b/actionpack/lib/action_dispatch/testing/test_response.rb index 527784885c1ea724ae251d285dc43d6576c4b25a..a9b88ac5fdfe95eb2f99fe041a81c3f8f78d59d5 100644 --- a/actionpack/lib/action_dispatch/testing/test_response.rb +++ b/actionpack/lib/action_dispatch/testing/test_response.rb @@ -7,7 +7,7 @@ module ActionDispatch # See Response for more information on controller response objects. class TestResponse < Response def self.from_response(response) - new response.status, response.headers, response.body, nil + new response.status, response.headers, response.body, default_headers: nil end # Was the response successful? diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb index e2a199ec4d3a9adf44f0747b645aac5efe87a08f..9131c51e91d320ba704865a53bfd8ad657509a11 100644 --- a/railties/lib/rails/ruby_version_check.rb +++ b/railties/lib/rails/ruby_version_check.rb @@ -1,13 +1,13 @@ -if RUBY_VERSION < '2.2.0' && RUBY_ENGINE == 'ruby' +if RUBY_VERSION < '2.2.1' && RUBY_ENGINE == 'ruby' desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" abort <<-end_message - Rails 5 requires to run on Ruby 2.2.0 or newer. + Rails 5 requires to run on Ruby 2.2.1 or newer. You're running #{desc} - Please upgrade to Ruby 2.2.0 or newer to continue. + Please upgrade to Ruby 2.2.1 or newer to continue. end_message end