Skip to content

Conversation

@nobu
Copy link
Member

@nobu nobu commented Dec 31, 2025

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
Copy link
Member

byroot commented Dec 31, 2025

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