Modify for current version of Ruby.