Code isn't confident
Closed this issue · 3 comments
orffen commented
Fix code per guidelines in Confident Ruby
orffen commented
This has been partially done in commit 8a2f075; the json readers have been made to explicitly use to_s
, to_i
etc. as appropriate to ensure the right exception is thrown at the right place.
orffen commented
Made an error here; using to_i
instead of to_int
explicitly forces the input instead of just checking if the input is valid and throwing an exception if it isn't.