Oh dang! You’re right, when I took it out of my example, it didn’t need that anymore. I definitely had this after a gets
Guess I should’ve included the whole thing or at least test that line by itself. Thanks for bringing that up. I’d hate to reference back to this and not understand why it doesn’t work right.
Oh dang! You’re right, when I took it out of my example, it didn’t need that anymore. I definitely had this after a
gets
Guess I should’ve included the whole thing or at least test that line by itself. Thanks for bringing that up. I’d hate to reference back to this and not understand why it doesn’t work right.
It still works with the
to_i
, it's just unnecessary.All it does is convert an integer to an integer, no harm done 🙃
Fixed it up anyway. It goes to show my point of how succinct Ruby is in this case.
And my posts contain no copying and pasting from samples. I’d never learn anything that way. For this, I always make up my own stuff and use that.