summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 07:51:04 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 07:51:04 +0000
commitf8665e42f01f5caff4cb90e1ba0893a8518d521f (patch)
treee7994866dfc9937de8e77fd306b98f5e44e7b1b0 /vm.c
parent7e88248f7dfc639492df59bb3b251bfb4163c996 (diff)
merge revision(s) 40525,40526,40528,40530: [Backport #8345]
proc.c: remove unnecessary static function * proc.c (proc_lambda): remove and use rb_block_lambda directly instead. * include/ruby/intern.h (rb_block_lambda): add declaration instead of deprecated rb_f_lambda. * proc.c (mproc, mlambda): use frozen core methods instead of plain global methods, so that methods cannot be overridden. [ruby-core:54687] [Bug #8345] * vm.c (Init_VM): define proc and lambda on the frozen core object. * defs/id.def (predefined): add "idProc". * proc.c (mnew, mproc, mlambda): use predefined IDs. * vm.c (Init_VM): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41649 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 6b2bd907ff..4af44b03db 100644
--- a/vm.c
+++ b/vm.c
@@ -2109,6 +2109,8 @@ Init_VM(void)
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_define_method_id(klass, idProc, rb_block_proc, 0);
+ rb_define_method_id(klass, idLambda, rb_block_lambda, 0);
rb_obj_freeze(fcore);
rb_gc_register_mark_object(fcore);
rb_mRubyVMFrozenCore = fcore;