[macruby-changes] [3785] MacRuby/trunk/dispatcher.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 17 11:22:14 PDT 2010
Revision: 3785
http://trac.macosforge.org/projects/ruby/changeset/3785
Author: martinlagardette at apple.com
Date: 2010-03-17 11:22:13 -0700 (Wed, 17 Mar 2010)
Log Message:
-----------
Raise if no block given in rb_vm_yield_under
- Fixes 7682741 & 7692160
Modified Paths:
--------------
MacRuby/trunk/dispatcher.cpp
Modified: MacRuby/trunk/dispatcher.cpp
===================================================================
--- MacRuby/trunk/dispatcher.cpp 2010-03-17 08:59:02 UTC (rev 3784)
+++ MacRuby/trunk/dispatcher.cpp 2010-03-17 18:22:13 UTC (rev 3785)
@@ -1645,6 +1645,10 @@
{
RoxorVM *vm = GET_VM();
rb_vm_block_t *b = vm->current_block();
+ if (b == NULL) {
+ rb_raise(rb_eLocalJumpError, "no block given");
+ }
+
vm->pop_current_block();
VALUE old_self = b->self;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100317/913ab749/attachment.html>
More information about the macruby-changes
mailing list