diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-11 10:53:48 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-11 10:53:48 +0000 |
commit | 8c6c9c46d8aecccfa66e9e34a76e7768025671b1 (patch) | |
tree | 364a8dfe2aa1075f4e0471ec176efe15e3290fb7 /gc.c | |
parent | c653db51b0b32bea9a8469dbc236538b011cc0b1 (diff) | |
download | ruby-8c6c9c46d8aecccfa66e9e34a76e7768025671b1.tar.gz |
* vm.c (rb_vm_register_special_exception): make new function to
make and register special exceptions.
* vm.c (rb_vm_mark): do not need to mark special exceptions
because they are registerd by rb_gc_register_mark_object().
* eval.c (Init_eval): use rb_vm_register_special_exception().
* gc.c (Init_GC): ditto.
* proc.c (Init_Proc): ditto.
* thread.c (Init_Thread): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -8585,10 +8585,7 @@ Init_GC(void) rb_define_module_function(rb_mObjSpace, "_id2ref", id2ref, 1); - 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); + rb_vm_register_special_exception(ruby_error_nomemory, rb_eNoMemError, "failed to allocate memory"); rb_define_method(rb_cBasicObject, "__id__", rb_obj_id, 0); rb_define_method(rb_mKernel, "object_id", rb_obj_id, 0); |