Remove deprecated warnings from Ruby 2.1