summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 22:03:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-02 22:03:24 +0000
commit86c58b7813ffec29dcdb243e42f93dc33b5ba132 (patch)
treea83648ff8c2b03c459e745ac6d1604348e4dc698 /gc.c
parenta9d25a31ee8d36766163744da57d287a86e1ce18 (diff)
* error.c (rb_exc_new3): keeps the given string itself.
* eval.c (Init_Proc), gc.c (Init_GC): freeze messages of preallocated special exceptions also. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 9cec529e6b..8a336222ff 100644
--- a/gc.c
+++ b/gc.c
@@ -2125,7 +2125,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);