summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index f75a11a937..5e6dd2d8e1 100644
--- a/gc.c
+++ b/gc.c
@@ -2115,7 +2115,8 @@ Init_GC()
source_filenames = st_init_strtable();
rb_global_variable(&nomem_error);
- nomem_error = rb_exc_new2(rb_eNoMemError, "failed to allocate memory");
+ nomem_error = rb_exc_new3(rb_eNoMemError,
+ rb_obj_freeze(rb_str_new2("failed to allocate memory")));
OBJ_TAINT(nomem_error);
OBJ_FREEZE(nomem_error);