Support Ruby 2.2

- Add 2.2 to the Travis CI configuration
- Fix warnings

(#357).