Maybe it’s just me, but I keep finding interpreter issues underlying my code. The latest has to do with accessing the file system. In the context of unit testing,
runs fine on my Mac, bar
cannot be created under temp/foo
since it’s not a directory.
Running it under Windows also errors, but the raised error is Errno::ENOENT
instead.
Of course this plays havoc with tests until the context of the environment is added
I hate having to add this sort of code, but the underlying OS is pushing these errors to Ruby and its doing the ‘right’ thing, pushing up what it gets. I guess my complaint is that I wish Ruby could hide these sorts of details and remap the error to a consistent (most correct) value. It’d be a little more code, but it’s all about making life easier for the lowly developer, right?
Imperfect worlds are such a pain.