diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1265,11 +1265,8 @@ rb_match_busy(VALUE match) int rb_match_count(VALUE match) { - struct re_registers *regs; if (NIL_P(match)) return -1; - regs = RMATCH_REGS(match); - if (!regs) return -1; - return regs->num_regs; + return RMATCH_REGS(match)->num_regs; } int @@ -1278,7 +1275,6 @@ 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; } |