Backports of Ruby features for older Ruby
