added compatibility with Ruby 2.0+ while retaining compatibility with 1.9
Merge remote-tracking branch 'rcrogers/master'