summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-06 08:54:32 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-06 08:54:32 +0900
commitaa94245a09887f95bc0cd353b3462108d76d13ed (patch)
tree3699f413121b565a909292fca077441dab06f0f6 /re.c
parent7460c884fb06a2c50a4a771761003ed78c8b28ce (diff)
Undefine MatchData.allocate [Feature #16294]
Diffstat (limited to 're.c')
-rw-r--r--re.c1
1 files changed, 1 insertions, 0 deletions
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);