Ruby 2 compatibility