From: Robert Feldt Date: 2003-05-29T19:23:44+09:00 Subject: Re: RCR: unpack/pack Bignum On Thu, 29 May 2003 nobu.nokada@softhome.net wrote: > Sorry, there's no combination of signedness and endianness, > 'N', 'n', 'V', 'v' are always unsigned. > > Rather, what about size specifier extends generic integer > conversion? > > [10].pack("i(8)") => "\0\0\0\0\0\0\0\012" # big endian > => "\012\0\0\0\0\0\0\0" # little endian > Sounds like a nice idea. however, for consistency we should also change 'A10' to 'A(10)'? Might not be adopted since it breaks old code? > > Maybe I'm mixing different things here, maybe better to have this a a > > method on Numeric? Numeric#to_raw_string and Numeric.from_raw_string(str)? > > It would be nice, but perhaps needs better name. > Yeah, I'm not sure what to call it really. Should be on Integer and not Numeric though, sorry. /Robert