Backports of Ruby features for older ruby
