Remove a direct call of rb_raise in Onigmo

This commit is contained in:
Nobuyoshi Nakada 2026-01-12 18:57:20 +09:00
parent aaf47cca03
commit f34297604f
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2026-01-12 12:35:28 +00:00

View File

@ -651,11 +651,7 @@ extern int
onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc ARG_UNUSED)
{
if (code > 0xff) {
#ifdef RUBY
rb_raise(rb_eRangeError, "%u out of char range", code);
#else
return ONIGERR_INVALID_CODE_POINT_VALUE;
#endif
}
*buf = (UChar )(code & 0xff);
return 1;