Revision
1155
Author
lsansonetti@apple.com
Date
2009-03-25 18:41:37 -0700 (Wed, 25 Mar 2009)

Log Message

make sure opt args are evaluated even if we are calling an empty method

Modified Paths

Diff

Modified: MacRuby/branches/experimental/roxor.cpp (1154 => 1155)


--- MacRuby/branches/experimental/roxor.cpp	2009-03-26 01:31:17 UTC (rev 1154)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-26 01:41:37 UTC (rev 1155)
@@ -4977,7 +4977,8 @@
 	assert(rcache.node != NULL);
 	const int node_type = nd_type(rcache.node);
 
-	if (node_type == NODE_SCOPE && rcache.node->nd_body == NULL) {
+	if (node_type == NODE_SCOPE && rcache.node->nd_body == NULL
+	    && rcache.arity.max == rcache.arity.min) {
 	    // Calling an empty method, let's just return nil!
 	    return Qnil;
 	}