Skip to content

Commit dcff731

Browse files
fix: prevent rubocop from mangling === to is_a? check
1 parent 853de30 commit dcff731

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/orb/internal/util.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)