From: Han Holl Date: 2002-05-26T21:57:38+09:00 Subject: Re: Unexpected Array#pack behaviour (bug?) ts wrote: >>>>>>"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") > Thanks a lot, Guy. I would never have guessed. This certainly isn't to the principle of my least surprise Han > >