[macruby-changes] [3000] MacRuby/trunk/re.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 13 00:01:36 PST 2009
Revision: 3000
http://trac.macosforge.org/projects/ruby/changeset/3000
Author: lsansonetti at apple.com
Date: 2009-11-13 00:01:36 -0800 (Fri, 13 Nov 2009)
Log Message:
-----------
temporary hack: do not crash on non-ASCII regexps
Modified Paths:
--------------
MacRuby/trunk/re.c
Modified: MacRuby/trunk/re.c
===================================================================
--- MacRuby/trunk/re.c 2009-11-13 08:00:58 UTC (rev 2999)
+++ MacRuby/trunk/re.c 2009-11-13 08:01:36 UTC (rev 3000)
@@ -2652,6 +2652,11 @@
}
#endif
}
+ const char *ptr = RSTRING_PTR(str);
+ if (strlen(ptr) != RSTRING_LEN(str)) {
+ // TODO
+ str = rb_str_new2("");
+ }
return rb_reg_initialize(obj, RSTRING_PTR(str), RSTRING_LEN(str), enc,
options, err);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091113/a5ccc756/attachment-0001.html>
More information about the macruby-changes
mailing list