ruby-changes:7086
From: nobu <ko1@a...>
Date: Thu, 14 Aug 2008 14:14:15 +0900 (JST)
Subject: [ruby-changes:7086] Ruby:r18604 (trunk): * vm.c (Init_VM): hide FrozenCore.
nobu 2008-08-14 14:14:01 +0900 (Thu, 14 Aug 2008) New Revision: 18604 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18604 Log: * vm.c (Init_VM): hide FrozenCore. Modified files: trunk/ChangeLog trunk/vm.c Index: ChangeLog =================================================================== --- ChangeLog (revision 18603) +++ ChangeLog (revision 18604) @@ -1,3 +1,7 @@ +Thu Aug 14 14:13:39 2008 Nobuyoshi Nakada <nobu@r...> + + * vm.c (Init_VM): hide FrozenCore. + Thu Aug 14 12:20:36 2008 Nobuyoshi Nakada <nobu@r...> * transcode.c (load_transcoder): suppress warning. Index: vm.c =================================================================== --- vm.c (revision 18603) +++ vm.c (revision 18604) @@ -1793,20 +1793,25 @@ Init_VM(void) { VALUE opts; + VALUE klass; + VALUE fcore; /* ::VM */ rb_cRubyVM = rb_define_class("RubyVM", rb_cObject); rb_undef_alloc_func(rb_cRubyVM); /* ::VM::FrozenCore */ - rb_mRubyVMFrozenCore = rb_define_module_under(rb_cRubyVM, "FrozenCore"); - rb_define_singleton_method(rb_mRubyVMFrozenCore, "core_set_method_alias", m_core_set_method_alias, 3); - rb_define_singleton_method(rb_mRubyVMFrozenCore, "core_set_variable_alias", m_core_set_variable_alias, 2); - rb_define_singleton_method(rb_mRubyVMFrozenCore, "core_undef_method", m_core_undef_method, 2); - rb_define_singleton_method(rb_mRubyVMFrozenCore, "core_define_method", m_core_define_method, 3); - rb_define_singleton_method(rb_mRubyVMFrozenCore, "core_define_singleton_method", m_core_define_singleton_method, 3); - rb_define_singleton_method(rb_mRubyVMFrozenCore, "core_set_postexe", m_core_set_postexe, 1); - rb_obj_freeze(rb_mRubyVMFrozenCore); + fcore = rb_module_new(); + RBASIC(fcore)->flags = T_ICLASS; + klass = rb_singleton_class(fcore); + rb_define_method_id(klass, id_core_set_method_alias, m_core_set_method_alias, 3); + rb_define_method_id(klass, id_core_set_variable_alias, m_core_set_variable_alias, 2); + rb_define_method_id(klass, id_core_undef_method, m_core_undef_method, 2); + rb_define_method_id(klass, id_core_define_method, m_core_define_method, 3); + rb_define_method_id(klass, id_core_define_singleton_method, m_core_define_singleton_method, 3); + rb_define_method_id(klass, id_core_set_postexe, m_core_set_postexe, 1); + rb_obj_freeze(fcore); + rb_mRubyVMFrozenCore = fcore; /* ::VM::Env */ rb_cEnv = rb_define_class_under(rb_cRubyVM, "Env", rb_cObject); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/