[macruby-changes] [2691] MacRuby/trunk/spec/frozen

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 30 14:30:39 PDT 2009


Revision: 2691
          http://trac.macosforge.org/projects/ruby/changeset/2691
Author:   mattaimonetti at gmail.com
Date:     2009-09-30 14:30:39 -0700 (Wed, 30 Sep 2009)
Log Message:
-----------
fixed an Array pack spec when using format = 'v' thanks to Ninh Bui aka Patrick Hernandez Bui (Phusion)

When format = "v", it should use little endianness for the short, i.e. least significant byte should be first. So in this case, it should be \x01\x00

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

Modified: MacRuby/trunk/spec/frozen/core/array/pack_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/array/pack_spec.rb	2009-09-30 14:45:26 UTC (rev 2690)
+++ MacRuby/trunk/spec/frozen/core/array/pack_spec.rb	2009-09-30 21:30:39 UTC (rev 2691)
@@ -714,7 +714,7 @@
       it "does not raise a RangeError even when a pack argument is >= 2**64" do
         [2**64-1].pack(format).should == binary("\xFF\xFF")
         [2**64  ].pack(format).should == binary("\x00\x00")
-        [2**64+1].pack(format).should == binary("\x00\x01")
+        [2**64+1].pack(format).should == binary("\x01\x00")
       end
 
       it "does not raise a RangeError even when a pack argument is <= -2**64" do

Modified: MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt
===================================================================
--- MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt	2009-09-30 14:45:26 UTC (rev 2690)
+++ MacRuby/trunk/spec/frozen/tags/macruby/core/array/pack_tags.txt	2009-09-30 21:30:39 UTC (rev 2691)
@@ -7,7 +7,7 @@
 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 '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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090930/3412ed99/attachment.html>


More information about the macruby-changes mailing list