title: How to generate Java's String hashCode using Ruby
body: <p>I want to generate, in Ruby, the same hash code returned by Java's String.hashCode method.  What approach would be most elegant?
  Java's String hashCode implementation is described here: <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#hashCode%28%29" rel="nofollow">http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#hashCode%28%29</a></p>