summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-27 22:39:15 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-06-27 22:39:15 +0900
commitdf5ae0a55005f7f02adbf21790300f28dc2e12fc (patch)
tree3e89aa8f802e416b76056bdee163a08c7953cffe /re.c
parenteaad44adb2043f0b597196fd44cfaae8db3a3b18 (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 're.c')
-rw-r--r--re.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/re.c b/re.c
index f8db6cb82d..4728fca654 100644
--- a/re.c
+++ b/re.c
@@ -1450,23 +1450,6 @@ rb_match_count(VALUE match)
return regs->num_regs;
}
-int
-rb_match_nth_defined(int nth, VALUE match)
-{
- struct re_registers *regs;
- if (NIL_P(match)) return FALSE;
- regs = RMATCH_REGS(match);
- if (!regs) return FALSE;
- if (nth >= regs->num_regs) {
- return FALSE;
- }
- if (nth < 0) {
- nth += regs->num_regs;
- if (nth <= 0) return FALSE;
- }
- return (BEG(nth) != -1);
-}
-
static void
match_set_string(VALUE m, VALUE string, long pos, long len)
{