Rewrite for older Ruby STD.