lib/rack/content_length.rb in rack-2.0.9.4 vs lib/rack/content_length.rb in rack-2.1.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'rack/utils'
require 'rack/body_proxy'
module Rack
@@ -13,10 +15,10 @@
def call(env)
status, headers, body = @app.call(env)
headers = HeaderHash.new(headers)
- if !STATUS_WITH_NO_ENTITY_BODY.include?(status.to_i) &&
+ if !STATUS_WITH_NO_ENTITY_BODY.key?(status.to_i) &&
!headers[CONTENT_LENGTH] &&
!headers[TRANSFER_ENCODING] &&
body.respond_to?(:to_ary)
obody = body