Fix sign-conversion warning

```
../../.././include/ruby/internal/special_consts.h:349:36: error: conversion to ‘VALUE’ {aka ‘long unsigned int’} from ‘int’ may change the sign of the result [-Werror=sign-conversion]
  349 |     return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
      |            ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
```
This commit is contained in:
Nobuyoshi Nakada 2024-08-11 16:04:37 +09:00
parent 1db8586279
commit 1fd0a1b4ce
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -346,7 +346,7 @@ RBIMPL_ATTR_CONSTEXPR(CXX11)
static inline VALUE static inline VALUE
rb_special_const_p(VALUE obj) rb_special_const_p(VALUE obj)
{ {
return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue; return (unsigned int)RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
} }
/** /**