[macruby-changes] [5008] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Thu Dec 9 16:59:21 PST 2010


Revision: 5008
          http://trac.macosforge.org/projects/ruby/changeset/5008
Author:   watson1978 at gmail.com
Date:     2010-12-09 16:59:18 -0800 (Thu, 09 Dec 2010)
Log Message:
-----------
Array#pack with format "PMm" will ignore star parameter.

Modified Paths:
--------------
    MacRuby/trunk/pack.c
    MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt

Modified: MacRuby/trunk/pack.c
===================================================================
--- MacRuby/trunk/pack.c	2010-12-09 23:14:40 UTC (rev 5007)
+++ MacRuby/trunk/pack.c	2010-12-10 00:59:18 UTC (rev 5008)
@@ -494,7 +494,9 @@
 	    }
 	}
 	if (*p == '*') {	/* set data length */
-	    len = strchr("@Xxu", type) ? 0 : items;
+	    len =  strchr("@Xxu", type) ? 0
+		: strchr("PMm", type) ? 1
+		: items;
 	    p++;
 	}
 	else if (ISDIGIT(*p)) {

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt	2010-12-09 23:14:40 UTC (rev 5007)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt	2010-12-10 00:59:18 UTC (rev 5008)
@@ -8,9 +8,7 @@
 fails:Array#pack with format 'Z' treats a multibyte character just as a byte sequence
 fails:Array#pack with format 'Z' returns result in ASCII-8BIT
 fails:Array#pack with format 'Z' cuts byte sequence even if it breaks a multibyte character
-fails:Array#pack with format 'M' ignores star parameter
 fails:Array#pack with format 'M' returns an US-ASCII string
-fails:Array#pack with format 'm' ignores star parameter
 fails:Array#pack with format 'm' returns an US-ASCII string
 fails:Array#pack with format 'u' returns an US-ASCII string
 fails:Array#pack with format 'x' returns an US-ASCII string
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101209/289aee87/attachment.html>


More information about the macruby-changes mailing list