What am I doing wrong?
The script suffered some bitrot. The version I posted in IRC works for me on both Ruby 1.8 and 1.9:
http://dump.thecybershadow.net/7f0b3e4b56df6bf78382f6161115f7e1/github_upload.rb Prodded GitHub support to have a look at the pull requests, too...