summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-19 04:02:21 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-19 04:02:21 +0000
commitcd30220afff0d5473022bfb5749716364ebc05a8 (patch)
treeff25171e4e731389fea8466fa852cbeb9c255ff7 /vm.c
parenta854a4358f84a04cb79b8e0db3a08f63731fd526 (diff)
* insnhelper.ci (vm_call_bmethod): fix to propagate information
that this proc is "from Method". [ruby-dev:31490] * proc.c (method_proc, rb_mod_define_method): ditto. * vm.c (vm_invoke_proc_core): removed. * vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/vm.c b/vm.c
index 8cb97eead0..c87017814d 100644
--- a/vm.c
+++ b/vm.c
@@ -606,8 +606,8 @@ vm_yield(rb_thread_t *th, int argc, VALUE *argv)
}
VALUE
-vm_invoke_proc_core(rb_thread_t *th, rb_proc_t *proc,
- VALUE self, int argc, VALUE *argv, int restore_safe)
+vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc,
+ VALUE self, int argc, VALUE *argv)
{
VALUE val = Qundef;
int state;
@@ -623,7 +623,7 @@ vm_invoke_proc_core(rb_thread_t *th, rb_proc_t *proc,
}
TH_POP_TAG();
- if (restore_safe) {
+ if (!proc->is_from_method) {
th->safe_level = stored_safe;
}
@@ -650,13 +650,6 @@ vm_invoke_proc_core(rb_thread_t *th, rb_proc_t *proc,
return val;
}
-VALUE
-vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc,
- VALUE self, int argc, VALUE *argv)
-{
- return vm_invoke_proc_core(th, proc, self, argc, argv, 1);
-}
-
/* special variable */
VALUE