diff options
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3141,7 +3141,7 @@ rb_reg_s_last_match(int argc, VALUE *argv) { VALUE nth; - if (rb_scan_args(argc, argv, "01", &nth) == 1) { + if (argc > 0 && rb_scan_args(argc, argv, "01", &nth) == 1) { VALUE match = rb_backref_get(); int n; if (NIL_P(match)) return Qnil; |