Ruby implementation of Turing Machine (Macchina di Turing)