diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-06-27 22:39:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-06-27 22:39:15 +0900 |
commit | df5ae0a55005f7f02adbf21790300f28dc2e12fc (patch) | |
tree | 3e89aa8f802e416b76056bdee163a08c7953cffe /variable.c | |
parent | eaad44adb2043f0b597196fd44cfaae8db3a3b18 (diff) |
Use `rb_reg_nth_defined` instead of `rb_match_nth_defined`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7983
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c index e9735a8c4d..c6c70e1391 100644 --- a/variable.c +++ b/variable.c @@ -902,7 +902,7 @@ rb_f_global_variables(void) int i, nmatch = rb_match_count(backref); buf[0] = '$'; for (i = 1; i <= nmatch; ++i) { - if (!rb_match_nth_defined(i, backref)) continue; + if (!RTEST(rb_reg_nth_defined(i, backref))) continue; if (i < 10) { /* probably reused, make static ID */ buf[1] = (char)(i + '0'); |