I figured out the problem. Ruby tr doesn't handle octal numbers like
perl does. Not sure if it's just not implemented or maybe there is a
correct way to do it I'm not sure of. In any case instead of trying
to use tr to map the octal numbers I just made an array of decimal
numbers for the even bit map and then made this function. Works fine.
def setEvenParity(str)
new = []
str.each_byte {|b| new << @even_parity[b]}
new.pack("C*")
end