[macruby-changes] [5014] MacRuby/trunk/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Dec 10 14:57:28 PST 2010
Revision: 5014
http://trac.macosforge.org/projects/ruby/changeset/5014
Author: lsansonetti at apple.com
Date: 2010-12-10 14:57:25 -0800 (Fri, 10 Dec 2010)
Log Message:
-----------
String#delete (and #count and friends): fix a bug when an escaped dash character in the transliteration pattern would still be interpreted as a range
Modified Paths:
--------------
MacRuby/trunk/string.c
Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c 2010-12-10 22:33:37 UTC (rev 5013)
+++ MacRuby/trunk/string.c 2010-12-10 22:57:25 UTC (rev 5014)
@@ -5137,7 +5137,7 @@
while (pos < chars_len) {
UChar c = chars[pos];
- if (pos + 2 < chars_len && chars[pos + 1] == '-') {
+ if (pos + 2 < chars_len && c != '\\' && chars[pos + 1] == '-') {
// Range
UChar e = chars[pos + 2];
if (c > e) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101210/cb880150/attachment.html>
More information about the macruby-changes
mailing list