On Mon, 16 Dec 2002 23:42:00 +0900, Yohanes Santoso
<ysantoso / jenny-gnome.dyndns.org> wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>gabriele renzi <surrender_it / rc1.vip.lng.yahoo.com> writes:
>

>
> (0..0xFFFFFF).each{|i| 
>        a = [i>>16&0xFF, i>>8&0xFF, i&0xFF].pack("c*"); 
>        
>        # Now we test if the packing is right
>        a.each_byte{|b| print "#{"%02X"%b} "}; puts;}
>        # And it is, it outputs:
>        # 00 00 00
>        # 00 00 01
>        # ......
>        # FF FF FE
>        # FF FF FF
>}


thanks, hat was interesting too