Name: Anonymous 2009-01-31 5:01
ok, so i wanted a simple way to run do a crc32 on files and i found someones python script to do it and it works pretty nicely. but since i like ruby a lot i decided to rewrite it in ruby. my version works (lol zlib does all the work) but i'm not convinced i'm doing it in the best way possible. basically i'm concerned there might be lots of places where if something fucks up i'm not handling it properly. one thing i've noticed is that ctrl+c'ing while the script is calculating the crc does not make the script stop cleanly. if this was c++ i would know how to handle all the dumb things that can happen with files. i do most of my ruby programming on rails so working with files is something i rarely have to do.
tl;dr any ruby programmers see dumb mistakes in my code?
http://pastebin.com/m5636859f
tl;dr any ruby programmers see dumb mistakes in my code?
http://pastebin.com/m5636859f