From: Alexandre Hudelot Date: 2006-07-16T09:19:49+09:00 Subject: salt = [Array.new(6){rand(256).chr}.join].pack("m").chomp This is a line taken from the "authentification" recipe in the 'Rails Recipes' book. I can see that it generates a string of random characters but I am unsure of all that's going on here. The strings that are generated have 8 characters, how come when the array is initialized with the arg '6' ? What exactly is .join doing here? What does .pack("m") do? And why the .chomp? I thought that was a func to remove newline characters. Thanks in advance for the help. -Alex -- Posted via http://www.ruby-forum.com/.