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

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 26 18:29:08 PDT 2009


Revision: 1195
          http://trac.macosforge.org/projects/ruby/changeset/1195
Author:   lsansonetti at apple.com
Date:     2009-03-26 18:29:08 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
route divisions by zero through the dispatcher (note: currently only handles the immediate/immediate case)

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

Modified: MacRuby/branches/experimental/roxor.cpp
===================================================================
--- MacRuby/branches/experimental/roxor.cpp	2009-03-27 01:19:25 UTC (rev 1194)
+++ MacRuby/branches/experimental/roxor.cpp	2009-03-27 01:29:08 UTC (rev 1195)
@@ -1419,6 +1419,9 @@
 		res = leftLong - rightLong;
 	    }
 	    else if (sel == selDIV) {
+		if (rightLong == 0) {
+		    return NULL;
+		}
 		res = leftLong / rightLong;
 	    }
 	    else if (sel == selMULT) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090326/8a2e3847/attachment.html>


More information about the macruby-changes mailing list