better handling of Ruby pre 1.8