Please sign in to comment.
Avoid hitting ArgumentError for parsing integers and floats.
This patch is not quite perfect. There are cases that Integer and Float handle that this does not, and the to_i and to_f methods have the annoying tendency to ignore unparsable sections of the string. We may just need to write a simple Ruby version of integer and float parsing to use here. I'd be very surprised if it didn't still balance out with regards to the exception-rescuing logic.
- Loading branch information...