* vm.c (vm_invoke_proc): skip setting safe_level if

it from bmethod.  This change makes test/ruby/test_proc.rb pass.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2008-07-25 06:56:23 +00:00
parent 20796c9000
commit 7c8ad088f5
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Fri Jul 25 15:52:40 2008 Koichi Sasada <ko1@atdot.net>
* vm.c (vm_invoke_proc): skip setting safe_level if
it from bmethod. This change makes test/ruby/test_proc.rb pass.
Fri Jul 25 10:00:00 2008 Martin Duerst <duerst@it.aoyama.ac.jp>
* test/ruby/test_transcode.rb: refactoring/cleanup of

4
vm.c
View File

@ -513,7 +513,9 @@ vm_invoke_proc(rb_thread_t *th, rb_proc_t *proc, VALUE self,
TH_PUSH_TAG(th);
if ((state = EXEC_TAG()) == 0) {
th->safe_level = proc->safe_level;
if (!proc->is_from_method) {
th->safe_level = proc->safe_level;
}
val = invoke_block_from_c(th, &proc->block, self, argc, argv, blockptr, 0);
}
TH_POP_TAG();