Skip to content
Browse files

Object#instance_eval yields a reciver object to the block

  • Loading branch information...
1 parent 25480ea commit 1274d869ae9fc0728cc68d67b3f05a313ee06464 @Watson1978 Watson1978 committed Jun 22, 2012
Showing with 1 addition and 2 deletions.
  1. +0 −1 spec/frozen/tags/macruby/core/kernel/instance_eval_tags.txt
  2. +1 −1 vm_eval.c
View
1 spec/frozen/tags/macruby/core/kernel/instance_eval_tags.txt
@@ -1,4 +1,3 @@
fails:Kernel#instance_eval doesn't pass the object to the block
fails:Kernel#instance_eval treats block-local variables as local to the block
-fails:Kernel#instance_eval yields the object to the block
fails:Kernel#instance_eval returns nil
View
2 vm_eval.c
@@ -338,7 +338,7 @@ specific_eval(int argc, VALUE *argv, VALUE klass, VALUE self)
argc);
}
rb_vm_set_current_scope(klass, SCOPE_PUBLIC);
- retval = rb_vm_yield_under(klass, self, 0, NULL);
+ retval = rb_vm_yield_under(klass, self, 1, &self);
}
else {
const char *file = "(eval)";

0 comments on commit 1274d86

Please sign in to comment.
Something went wrong with that request. Please try again.