Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

i accidentally the whole file

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

Name: Anonymous 2009-02-01 17:47

>>11
And even if there were such a function in the standard library, it would invariably do something stupid like printing it to stdout instead of returning the number, making it almost, but not entirely, useless.

Oh, wait, that's wordpress I'm thinking of.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List