[macruby-changes] [1111] MacRuby/branches/experimental/roxor.cpp

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 23 12:06:25 PDT 2009


Revision: 1111
          http://trac.macosforge.org/projects/ruby/changeset/1111
Author:   lsansonetti at apple.com
Date:     2009-03-23 12:06:25 -0700 (Mon, 23 Mar 2009)
Log Message:
-----------
fixed the dispatch of nil as an opt block (obj.foo(&nil))

Modified Paths:
--------------
    MacRuby/branches/experimental/roxor.cpp

Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp	2009-03-23 15:25:14 UTC (rev 1110)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-23 19:06:25 UTC (rev 1111)
@@ -4926,6 +4926,9 @@
 void *
 rb_vm_get_block(VALUE obj)
 {
+    if (obj == Qnil) {
+	return NULL;
+    }
     VALUE proc = rb_check_convert_type(obj, T_DATA, "Proc", "to_proc");
     if (NIL_P(proc)) {
 	rb_raise(rb_eTypeError,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090323/964ccbfd/attachment-0001.html>


More information about the macruby-changes mailing list