diff options
author | S-H-GAMELINKS <gamelinks007@gmail.com> | 2022-11-15 13:24:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-11-16 18:58:33 +0900 |
commit | 1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6 (patch) | |
tree | 823f1ca5409fdd930b05d974cdb70953b6e7e128 /transcode.c | |
parent | dc1c4e46758ace2c9e5e822df0d64b16bb564bb4 (diff) |
Using UNDEF_P macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6721
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c index e315a8f1ab..f1d871e292 100644 --- a/transcode.c +++ b/transcode.c @@ -2352,7 +2352,7 @@ transcode_loop(const unsigned char **in_pos, unsigned char **out_pos, ec->last_error.error_bytes_len, rb_enc_find(ec->last_error.source_encoding)); rep = (*fallback_func)(fallback, rep); - if (rep != Qundef && !NIL_P(rep)) { + if (!UNDEF_P(rep) && !NIL_P(rep)) { StringValue(rep); ret = rb_econv_insert_output(ec, (const unsigned char *)RSTRING_PTR(rep), RSTRING_LEN(rep), rb_enc_name(rb_enc_get(rep))); |