File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -600,11 +600,12 @@ class << self
600600 #
601601 # @return [Object]
602602 def encode_content ( headers , body )
603+ # rubocop:disable Style/CaseEquality
603604 content_type = headers [ "content-type" ]
604605 case [ content_type , body ]
605606 in [ Orb ::Internal ::Util ::JSON_CONTENT , Hash | Array | -> { primitive? ( _1 ) } ]
606607 [ headers , JSON . generate ( body ) ]
607- in [ Orb ::Internal ::Util ::JSONL_CONTENT , Enumerable ] unless body . is_a? ( Orb ::Internal ::Type ::FileInput )
608+ in [ Orb ::Internal ::Util ::JSONL_CONTENT , Enumerable ] unless Orb ::Internal ::Type ::FileInput === body
608609 [ headers , body . lazy . map { JSON . generate ( _1 ) } ]
609610 in [ %r{^multipart/form-data} , Hash | Orb ::Internal ::Type ::FileInput ]
610611 boundary , strio = encode_multipart_streaming ( body )
@@ -619,6 +620,7 @@ def encode_content(headers, body)
619620 else
620621 [ headers , body ]
621622 end
623+ # rubocop:enable Style/CaseEquality
622624 end
623625
624626 # @api private
You can’t perform that action at this time.
0 commit comments