[macruby-changes] [4438] MacRuby/trunk/string.c

source_changes at macosforge.org source_changes at macosforge.org
Fri Aug 20 16:04:56 PDT 2010


Revision: 4438
          http://trac.macosforge.org/projects/ruby/changeset/4438
Author:   lsansonetti at apple.com
Date:     2010-08-20 16:04:56 -0700 (Fri, 20 Aug 2010)
Log Message:
-----------
String#strip: don't strip non-ASCII whitespaces

Modified Paths:
--------------
    MacRuby/trunk/string.c

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2010-08-20 04:22:34 UTC (rev 4437)
+++ MacRuby/trunk/string.c	2010-08-20 23:04:56 UTC (rev 4438)
@@ -4347,7 +4347,7 @@
 	// Strip left side.
 	long pos = 0;
 	while (pos < len) {
-	    if (!iswspace(rb_str_get_uchar(str, pos))) {
+	    if (!isspace((char)rb_str_get_uchar(str, pos))) {
 		break;
 	    }
 	    pos++;
@@ -4365,7 +4365,7 @@
 	long pos = len - 1;
 	while (pos >= 0) {
 	    UChar c = rb_str_get_uchar(str, pos);
-	    if (!iswspace(c) && c != '\0') {
+	    if (!isspace((char)c) && c != '\0') {
 		break;
 	    }
 	    pos--;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100820/fed4b433/attachment.html>


More information about the macruby-changes mailing list