[macruby-changes] [3202] MacRuby/trunk/vm.cpp

source_changes at macosforge.org source_changes at macosforge.org
Thu Jan 7 13:21:14 PST 2010


Revision: 3202
          http://trac.macosforge.org/projects/ruby/changeset/3202
Author:   lsansonetti at apple.com
Date:     2010-01-07 13:21:10 -0800 (Thu, 07 Jan 2010)
Log Message:
-----------
don't assert anything regarding the special code, let rb_reg_nth_match() do the boundaries check

Modified Paths:
--------------
    MacRuby/trunk/vm.cpp

Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp	2010-01-07 21:03:17 UTC (rev 3201)
+++ MacRuby/trunk/vm.cpp	2010-01-07 21:21:10 UTC (rev 3202)
@@ -3248,8 +3248,8 @@
 	    break;
 	default:
 	    {
-		int index = (int)code;
-		assert(index > 0 && index < 10);
+		const int index = (int)code;
+		// Boundaries check is done in rb_reg_nth_match().
 		val = rb_reg_nth_match(index, backref);
 	    }
 	    break;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100107/421520e8/attachment-0001.html>


More information about the macruby-changes mailing list