Closed tomeon closed 1 year ago
Thank you, LGTM.
I wish we'd be able to rescue something more specific than ArgumentError
though. I see there is a ScanError
error but it's not used for unexpected encoding.
I wish we'd be able to rescue something more specific than ArgumentError though.
Yeah, this is a bummer. I wonder what the bad argument is supposed to be, anyway? The data given to StringScanner.new
? Or perhaps StringScanner
is just bubbling up an ArgumentError
from elsewhere? Didn't look too deeply into it.
Follow-up to #73 and #74. Recover from
ArgumentError
scanning through the first line of a file looking for a shell shebang (StringScanner
raises anArgumentError
on bad/unexpected encodings/data).