Practicing factorial functions in ruby