Strip and associated methods in ruby 1.9.2 + (including 1.9.3 and 2.0.0) don't remove leading or trailing non-ascii white space (such as unicode ideographic space or unicode non-breaking space). This is a change from ruby 1.9.1 where these were removed. These space characters are recognized by /[[:space:]]/. This patch (for 2.0.0) restores the 1.9.1 behavior. Same patch will apply to 1.9.2 and 1.9.3 at offset and slight fuzz. This patch (excepting the isspace changes) also fixes a bug in ruby 1.9.1 where strings would fail to hash consistently after being stripped if the strip converted a non-7-bit-ascii-clean string to a 7-bit-ascii-clean string. A constant, UNICODE_STRIP_PATCH, is provided on the String class to query for runtime determination if the patch is applied. See the comment below the diff for a fuller explanation (formatting is not allowed in the GIST description which makes it otherwise difficult to read).