From: ts Date: 2002-05-26T21:44:03+09:00 Subject: Re: Unexpected Array#pack behaviour (bug?) >>>>> "H" == Han Holl writes: H> In your first example a "\n" gets inserted at a (seemingly) random H> point. For the format `m', the optional argument give the length of the string to encode (multiple of 3). If it's <= 2, ruby use the default value of 45 ["abcdefghi", 2, 3, 4, 5, 6].pach("m*) <==> ["abcdefghi"].pack("m6") ["abcdefghi", 2].pach("m*) <==> ["abcdefghi"].pack("m2") pigeon% irb irb(main):001:0> ["abcdefghi"].pack("m6") "YWJjZGVm\nZ2hp\n" irb(main):002:0> ["abcdef"].pack("m") "YWJjZGVm\n" irb(main):003:0> ["ghi"].pack("m") "Z2hp\n" irb(main):004:0> pigeon% Guy Decoux