From: nobu@... Date: 2006-06-23T01:50:47+09:00 Subject: Re: Using pack/unpack to go from string to address and back to string Hi, At Wed, 21 Jun 2006 23:22:17 +0900, Berger, Daniel wrote in [ruby-talk:198375]: > It was pointed out to me that Ruby uses rb_str_associate and > rb_str_associated behind the scenes with regards to pack('p'), but I'm > also wondering about addresses for strings that weren't obtained via > pack('p*'). > > Or is this simply impossible? It's disallowed. If it were possible, you could get an illegal "String." For instance: [1].pack('l').unpack('p*') -- Nobu Nakada