summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-21 10:12:21 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-21 10:12:21 +0000
commit3da3230f0cb85bec3f62e13e8679e2255563b1c7 (patch)
tree8af62a7ec2d70baec20f15539ff5e9f34ffbfa68 /vm.c
parent35230b1a783b1d8655055e118fcaefaea3f53b52 (diff)
* 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index fa028fd187..e522c9f300 100644
--- a/vm.c
+++ b/vm.c
@@ -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);