Skip to content

Fix non-portable code#921

Merged
nobu merged 1 commit into
ruby:masterfrom
nobu:nonportable-code
Dec 31, 2025
Merged

Fix non-portable code#921
nobu merged 1 commit into
ruby:masterfrom
nobu:nonportable-code

Conversation

@nobu

@nobu nobu commented Dec 31, 2025

Copy link
Copy Markdown
Member

A plain char may be signed or unsigned depending on the implementation. Also, bitwise ORing of signed values ​​is not guaranteed to be signed. To ensure portability, should logical-OR each comparison, but casting to signed char is usually sufficient.

A plain `char` may be `signed` or `unsigned` depending on the
implementation.  Also, bitwise ORing of `signed` values ​​is not
guaranteed to be `signed`.  To ensure portability, should logical-OR
each comparison, but casting to `signed char` is usually sufficient.
@nobu nobu merged commit 3e23e57 into ruby:master Dec 31, 2025
40 checks passed
@nobu nobu deleted the nonportable-code branch December 31, 2025 12:43
@byroot

byroot commented Dec 31, 2025

Copy link
Copy Markdown
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants