[macruby-changes] [4302] MacRuby/trunk/re.cpp

source_changes at macosforge.org source_changes at macosforge.org
Mon Jun 28 13:08:17 PDT 2010


Revision: 4302
          http://trac.macosforge.org/projects/ruby/changeset/4302
Author:   lsansonetti at apple.com
Date:     2010-06-28 13:08:16 -0700 (Mon, 28 Jun 2010)
Log Message:
-----------
don't crash if there is no capture (<rdar://problem/8137974>)

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

Modified: MacRuby/trunk/re.cpp
===================================================================
--- MacRuby/trunk/re.cpp	2010-06-28 04:24:59 UTC (rev 4301)
+++ MacRuby/trunk/re.cpp	2010-06-28 20:08:16 UTC (rev 4302)
@@ -1528,7 +1528,7 @@
 match_array(VALUE match, int start)
 {
     const int len = RMATCH(match)->results_count;
-    assert(start >= 0 && start < len);
+    assert(start >= 0);
     const bool tainted = OBJ_TAINTED(match);
 
     VALUE ary = rb_ary_new2(len);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100628/4ae5c028/attachment.html>


More information about the macruby-changes mailing list