connection.rb: compatibility with Ruby 1.9 and 2.0
Merge pull request #11 from pcarrier-forks/master

Compatibility with Ruby 1.9 and 2.0