mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
35230b1a78
commit
3da3230f0c
3 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Thu Dec 10 09:20:58 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Mon Dec 21 17:51:44 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Dec 21 17:51:44 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* regcomp.c (optimize_node_left): include equal on the condition of for-loop.
|
* regcomp.c (optimize_node_left): include equal on the condition of for-loop.
|
||||||
|
|
|
@ -1505,6 +1505,7 @@ Init_Encoding(void)
|
||||||
|
|
||||||
rb_cEncoding = rb_define_class("Encoding", rb_cObject);
|
rb_cEncoding = rb_define_class("Encoding", rb_cObject);
|
||||||
rb_undef_alloc_func(rb_cEncoding);
|
rb_undef_alloc_func(rb_cEncoding);
|
||||||
|
rb_undef_method(CLASS_OF(rb_cEncoding), "new");
|
||||||
rb_define_method(rb_cEncoding, "to_s", enc_name, 0);
|
rb_define_method(rb_cEncoding, "to_s", enc_name, 0);
|
||||||
rb_define_method(rb_cEncoding, "inspect", enc_inspect, 0);
|
rb_define_method(rb_cEncoding, "inspect", enc_inspect, 0);
|
||||||
rb_define_method(rb_cEncoding, "name", enc_name, 0);
|
rb_define_method(rb_cEncoding, "name", enc_name, 0);
|
||||||
|
|
2
vm.c
2
vm.c
|
@ -1944,6 +1944,7 @@ Init_VM(void)
|
||||||
/* ::VM */
|
/* ::VM */
|
||||||
rb_cRubyVM = rb_define_class("RubyVM", rb_cObject);
|
rb_cRubyVM = rb_define_class("RubyVM", rb_cObject);
|
||||||
rb_undef_alloc_func(rb_cRubyVM);
|
rb_undef_alloc_func(rb_cRubyVM);
|
||||||
|
rb_undef_method(CLASS_OF(rb_cRubyVM), "new");
|
||||||
|
|
||||||
/* ::VM::FrozenCore */
|
/* ::VM::FrozenCore */
|
||||||
fcore = rb_class_new(rb_cBasicObject);
|
fcore = rb_class_new(rb_cBasicObject);
|
||||||
|
@ -1962,6 +1963,7 @@ Init_VM(void)
|
||||||
/* ::VM::Env */
|
/* ::VM::Env */
|
||||||
rb_cEnv = rb_define_class_under(rb_cRubyVM, "Env", rb_cObject);
|
rb_cEnv = rb_define_class_under(rb_cRubyVM, "Env", rb_cObject);
|
||||||
rb_undef_alloc_func(rb_cEnv);
|
rb_undef_alloc_func(rb_cEnv);
|
||||||
|
rb_undef_method(CLASS_OF(rb_cEnv), "new");
|
||||||
|
|
||||||
/* ::Thread */
|
/* ::Thread */
|
||||||
rb_cThread = rb_define_class("Thread", rb_cObject);
|
rb_cThread = rb_define_class("Thread", rb_cObject);
|
||||||
|
|
Loading…
Reference in a new issue