diff --git a/ChangeLog b/ChangeLog index de82551610..6cdc8ed3ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jul 3 07:02:55 2008 Nobuyoshi Nakada + + * eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze + messages of preallocated special exceptions also. + Thu Jul 3 04:39:30 2008 Nobuyoshi Nakada * gc.c (rb_during_gc): VALUE cache is irrelevant. diff --git a/eval.c b/eval.c index 40eec61a88..e19935a9cc 100644 --- a/eval.c +++ b/eval.c @@ -1201,7 +1201,8 @@ Init_eval(void) rb_define_virtual_variable("$SAFE", safe_getter, safe_setter); - exception_error = rb_exc_new2(rb_eFatal, "exception reentered"); + exception_error = rb_exc_new2(rb_eFatal, + rb_obj_freeze(rb_str_new2("exception reentered"))); rb_ivar_set(exception_error, idThrowState, INT2FIX(TAG_FATAL)); OBJ_TAINT(exception_error); OBJ_FREEZE(exception_error); diff --git a/gc.c b/gc.c index 534369df4c..41940e7ca1 100644 --- a/gc.c +++ b/gc.c @@ -2531,7 +2531,8 @@ Init_GC(void) rb_define_module_function(rb_mObSpace, "_id2ref", id2ref, 1); - 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); diff --git a/proc.c b/proc.c index cb98853a1b..415ad1c201 100644 --- a/proc.c +++ b/proc.c @@ -1760,7 +1760,8 @@ Init_Proc(void) rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0); rb_eSysStackError = rb_define_class("SystemStackError", rb_eException); - sysstack_error = rb_exc_new2(rb_eSysStackError, "stack level too deep"); + sysstack_error = rb_exc_new3(rb_eSysStackError, + rb_obj_freeze(rb_str_new2("stack level too deep"))); OBJ_TAINT(sysstack_error); OBJ_FREEZE(sysstack_error);