Skip to content

Commit 4cc7c41

Browse files
fix: prevent rubocop from mangling === to is_a? check
1 parent 836f0a6 commit 4cc7c41

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/onebusaway_sdk/internal/util.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,13 @@ class << self
600600
#
601601
# @return [Object]
602602
def encode_content(headers, body)
603+
# rubocop:disable Style/CaseEquality
604+
# rubocop:disable Layout/LineLength
603605
content_type = headers["content-type"]
604606
case [content_type, body]
605607
in [OnebusawaySDK::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }]
606608
[headers, JSON.generate(body)]
607-
in [OnebusawaySDK::Internal::Util::JSONL_CONTENT, Enumerable] unless body.is_a?(OnebusawaySDK::Internal::Type::FileInput)
609+
in [OnebusawaySDK::Internal::Util::JSONL_CONTENT, Enumerable] unless OnebusawaySDK::Internal::Type::FileInput === body
608610
[headers, body.lazy.map { JSON.generate(_1) }]
609611
in [%r{^multipart/form-data}, Hash | OnebusawaySDK::Internal::Type::FileInput]
610612
boundary, strio = encode_multipart_streaming(body)
@@ -619,6 +621,8 @@ def encode_content(headers, body)
619621
else
620622
[headers, body]
621623
end
624+
# rubocop:enable Layout/LineLength
625+
# rubocop:enable Style/CaseEquality
622626
end
623627

624628
# @api private

0 commit comments

Comments
 (0)