diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-21 10:12:21 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-21 10:12:21 +0000 |
commit | 3da3230f0cb85bec3f62e13e8679e2255563b1c7 (patch) | |
tree | 8af62a7ec2d70baec20f15539ff5e9f34ffbfa68 /vm.c | |
parent | 35230b1a783b1d8655055e118fcaefaea3f53b52 (diff) | |
download | ruby-3da3230f0cb85bec3f62e13e8679e2255563b1c7.tar.gz |
* encoding.c (Init_Encoding): undef Encoding.new because
a class which is rb_undef_alloc-func-ed can't call new method.
[ruby-dev:39862]
* vm.c (Init_VM): undef RubyVM.new and RubyVM::Env.new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1944,6 +1944,7 @@ Init_VM(void) /* ::VM */ rb_cRubyVM = rb_define_class("RubyVM", rb_cObject); rb_undef_alloc_func(rb_cRubyVM); + rb_undef_method(CLASS_OF(rb_cRubyVM), "new"); /* ::VM::FrozenCore */ fcore = rb_class_new(rb_cBasicObject); @@ -1962,6 +1963,7 @@ Init_VM(void) /* ::VM::Env */ rb_cEnv = rb_define_class_under(rb_cRubyVM, "Env", rb_cObject); rb_undef_alloc_func(rb_cEnv); + rb_undef_method(CLASS_OF(rb_cEnv), "new"); /* ::Thread */ rb_cThread = rb_define_class("Thread", rb_cObject); |