Fix ruby if/elsif/else conversion