Revision
3751
Author
lsansonetti@apple.com
Date
2010-03-12 19:26:45 -0800 (Fri, 12 Mar 2010)

Log Message

print the regexp that could not be compiled in the exception

Modified Paths

Diff

Modified: MacRuby/trunk/re.cpp (3750 => 3751)


--- MacRuby/trunk/re.cpp	2010-03-13 03:14:38 UTC (rev 3750)
+++ MacRuby/trunk/re.cpp	2010-03-13 03:26:45 UTC (rev 3751)
@@ -140,7 +140,8 @@
 	delete unistr;
 	if (excp != NULL) {
 	    char error[1024];
-	    snprintf(error, sizeof error, "regexp compilation error: %s",
+	    snprintf(error, sizeof error, "regexp `%s 'compilation error: %s",
+		    RSTRING_PTR(str),
 		    u_errorName(status));
 	    *excp = rb_exc_new2(rb_eRegexpError, error);
 	}