Updated #safe to not blow up JRuby and Rubinius.