From: Arup Rakshit Date: 2013-01-13T02:21:37+09:00 Subject: Can anyone tell me the computational logic of Unpack() method of string? Hi, I tried the below small fragments in my IRB : $ 'A'.unpack('b*') => ["10000010"] $ 'A'.unpack('B*') => ["01000001"] $ "hello".unpack('B*') => ["0110100001100101011011000110110001101111"] $ "hello".unpack('C*').map {|e| e.to_s 2} => ["1101000", "1100101", "1101100", "1101100", "1101111"] But couldn't understand the logic. So any help would be appreciated! Thanks, -- Posted via http://www.ruby-forum.com/.