3-2-stable: add ruby 2.2 compatibility

Fixes some warnings that were preventing our rails app from running on ruby 2.2.0-rc1 with rails 3.2.