summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
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 56b5144f9f..3efd540359 100644
--- a/re.c
+++ b/re.c
@@ -2967,6 +2967,7 @@ rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
return Qnil;
}
FL_SET(re, REG_LITERAL);
+ rb_obj_freeze(re);
return re;
}