diff options
author | S-H-GAMELINKS <[email protected]> | 2022-11-15 13:24:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-11-16 18:58:33 +0900 |
commit | 1f4f6c9832d83e7ebd65ccf4e95cef358b3512c6 (patch) | |
tree | 823f1ca5409fdd930b05d974cdb70953b6e7e128 /vm_args.c | |
parent | dc1c4e46758ace2c9e5e822df0d64b16bb564bb4 (diff) |
Using UNDEF_P macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6721
Diffstat (limited to 'vm_args.c')
-rw-r--r-- | vm_args.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -283,7 +283,7 @@ make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE obj = rb_ary_hidden_new(1); for (i=0; i<passed_keyword_len; i++) { - if (kw_argv[i] != Qundef) { + if (!UNDEF_P(kw_argv[i])) { rb_ary_push(obj, passed_keywords[i]); } } @@ -297,7 +297,7 @@ make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VA VALUE obj = rb_hash_new_with_size(passed_keyword_len); for (i=0; i<passed_keyword_len; i++) { - if (kw_argv[i] != Qundef) { + if (!UNDEF_P(kw_argv[i])) { rb_hash_aset(obj, passed_keywords[i], kw_argv[i]); } } @@ -355,7 +355,7 @@ args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *cons found++; } else { - if (default_values[di] == Qundef) { + if (UNDEF_P(default_values[di])) { locals[i] = Qnil; if (LIKELY(i < KW_SPECIFIED_BITS_MAX)) { |