Modified: MacRuby/trunk/pack.c (2696 => 2697)
--- MacRuby/trunk/pack.c 2009-10-01 01:21:43 UTC (rev 2696)
+++ MacRuby/trunk/pack.c 2009-10-01 02:25:40 UTC (rev 2697)
@@ -626,7 +626,7 @@
long i, j = 0;
if (len > plen) {
- j = (len - plen + 1)/2;
+ j = (len + 1) / 2 - (plen + 1) / 2;
len = plen;
}
for (i=0; i++ < len; ptr++) {
Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt (2696 => 2697)
--- MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt 2009-10-01 01:21:43 UTC (rev 2696)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt 2009-10-01 02:25:40 UTC (rev 2697)
@@ -6,14 +6,6 @@
fails:Array#pack with format 'a' cuts byte sequence even if it breaks a multibyte character
fails:Array#pack with format 'Z' cuts byte sequence even if it breaks a multibyte character
fails:Array#pack with format 'H' fills low-nibble of the last byte with 0 when count is odd even if pack argument has insufficient length
-fails:Array#pack with format 'h' fills high-nibble of the last byte with 0 when count is odd even if pack argument has insufficient length
-#fails:Array#pack with format 'v' does not raise a RangeError even when a pack argument is >= 2**64
-fails:Array#pack with format 's!' does not raise a RangeError even when a pack argument is >= 2**64
-fails:Array#pack with format 's_' does not raise a RangeError even when a pack argument is >= 2**64
-fails:Array#pack with format 'S!' does not raise a RangeError even when a pack argument is >= 2**64
-fails:Array#pack with format 'S_' does not raise a RangeError even when a pack argument is >= 2**64
-fails:Array#pack with format 's' does not raise a RangeError even when a pack argument is >= 2**64
-fails:Array#pack with format 'S' does not raise a RangeError even when a pack argument is >= 2**64
fails:Array#pack with format 'M' ignores star parameter
critical:Array#pack with format 'M' does not check whether the pack argument responds to #to_s before call #to_s
fails:Array#pack with format 'm' does not append newline if line length parameter is 0