I suppose Sean Carley's solution came in too late for the summary, but I
think it's definitely worth looking at for its terseness. Here's a bonus
summary.

>   #!/usr/bin/ruby
>   require 'uri'
>   require 'net/http'

So Sean's using a couple of libraries like the other solutions.
Actually, just one, really: net/http. You don't need to explicitly
require 'uri'; net/http requires it. No command-line switches here.

Watch as a complete solution unfolds in just three lines. You can
probably read it just as well without my commentary.

> result = Net::HTTP.post_form(URI.parse('http://rafb.net/paste/paste.php'),
>                             {:text => ARGF.readlines,
>                              :nick => 'paste user',
>                              :lang => 'Ruby'})

Line one uses Net::HTTP.post_form to send a form-style POST request and
get back the result. post_form takes two parameters, the target URI, and
a hash of form data.

The value of the form variable "text" comes from ARGF (like Stefano
Taschini's solution and others) which will get input from filenames
given as command-line arguments or from standard input.

After one line, we have the paste URL that the quiz wants in
result['location'], but Sean's going for bonus points!

> result = Net::HTTP.get_response 'rubyurl.com',
>                               '/rubyurl/remote?website_url=http://rafb.net' + result['location']

RubyURL provides a URL specifically to be used in other ways than
through its form: "http://rubyurl.com/rubyurl/remote". Line two uses
Net::HTTP.get_response to send a GET request to this location, passing
as the website_url the URL from line one's result.

> puts result['location'].sub('rubyurl/show/', '')

The result from line two is an HTTP redirect with a Location like
"http://rubyurl/rubyurl/show/xyz". This page displays the new RubyURL
that's been made, but we don't want that, we want the RubyURL itself.
That can be obtained just by removing the middle bit of the URL.

And we're done. Too easy!

Cheers,
Dave