conways in ruby - four ways