martimatix / Ruby_Dice

A Yahtzee clone written in ruby that runs in the terminal
MIT License
3 stars 0 forks source link

gets.chomp #34

Closed Zrp200 closed 9 years ago

Zrp200 commented 9 years ago

In my experience, gets should only be used in executables. I've seen it ruin my programs before.

martimatix commented 9 years ago

What's the alternative?

Zrp200 commented 9 years ago

Remove it from the library and put it into the executable as a Proc or lambda

Zrp200 commented 9 years ago

If anything is in ARGV when gets is executed, the value in ARGV will be used instead of prompting the user

Zrp200 commented 9 years ago

It can be addressed later