mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm.c (Init_VM): hide FrozenCore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
473dbc4e3f
commit
86cd6d2e98
2 changed files with 17 additions and 8 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Aug 14 14:13:39 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm.c (Init_VM): hide FrozenCore.
|
||||
|
||||
Thu Aug 14 12:20:36 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* transcode.c (load_transcoder): suppress warning.
|
||||
|
|
21
vm.c
21
vm.c
|
@ -1793,20 +1793,25 @@ void
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue