summaryrefslogtreecommitdiff
path: root/ext/date/date_parse.c
diff options
context:
space:
mode:
authorMarc-Andre Lafortune <github@marc-andre.ca>2020-12-19 22:28:20 -0500
committerMarc-André Lafortune <github@marc-andre.ca>2020-12-22 03:12:51 -0500
commitee102de6d7ec2454dc5da223483737478eb7bcc7 (patch)
treefe916dd94c2f88706329edc22dabf35f9da1d0fd /ext/date/date_parse.c
parent7fbad9224188905a6d96dee5aad5b1e1564e4461 (diff)
[ruby/date] Deep-freeze internal constants.
Probably not strictly necessary, but good principle anyways.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3946
Diffstat (limited to 'ext/date/date_parse.c')
-rw-r--r--ext/date/date_parse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index 0378e50cf7..5fa036ed72 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -276,6 +276,7 @@ regcomp(const char *source, long len, int opt)
VALUE pat;
pat = rb_reg_new(source, len, opt);
+ rb_obj_freeze(pat);
rb_gc_register_mark_object(pat);
return pat;
}