by b7kich · 14y ago · 0 comments
Edit: actually, Java's String.hashCode() has exactly the same problem — prepending null chars doesn't change the hash code. And because the hash function is actually part of the Java standard library docs, it will probably never be changed (unlike Ruby's).
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-Ma...