From aa94245a09887f95bc0cd353b3462108d76d13ed Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 6 Nov 2019 08:54:32 +0900 Subject: Undefine MatchData.allocate [Feature #16294] --- re.c | 1 + 1 file changed, 1 insertion(+) (limited to 're.c') diff --git a/re.c b/re.c index 34880a849c..4b9d662525 100644 --- a/re.c +++ b/re.c @@ -4110,6 +4110,7 @@ Init_Regexp(void) rb_cMatch = rb_define_class("MatchData", rb_cObject); rb_define_alloc_func(rb_cMatch, match_alloc); rb_undef_method(CLASS_OF(rb_cMatch), "new"); + rb_undef_method(CLASS_OF(rb_cMatch), "allocate"); rb_define_method(rb_cMatch, "initialize_copy", match_init_copy, 1); rb_define_method(rb_cMatch, "regexp", match_regexp, 0); -- cgit v1.2.1