From: notnorwegian@... Date: 2008-05-27T13:29:20+09:00 Subject: string+char, cant convert nil, but not nil tryong to do a ROT13(http://en.wikipedia.org/wiki/Rot_13) encrypter/ decrypter. x = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" y = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm" arr = x.split(//).zip(y.split(//)) dict = Hash[*arr.flatten] puts "Input phrase: " phrase = gets rotated = "" for x in (0..phrase.length()-1) rotated = rotated + dict[phrase[x].chr] end puts rotated '+' cant convert nil into string cant convert nil into string puts dict[phrase[2].chr] works though...