X Interview Question

Point out problems in a ruby code.