# File lib/gettext/mofile.rb, line 190 def hash_string(str) hval = 0 i = 0 str.each_byte do |b| break if b == '\0' hval <<= 4 hval += b.to_i g = hval & (0xf << (HASHWORDBITS - 4)) if (g != 0) hval ^= g >> (HASHWORDBITS - 8) hval ^= g end end hval end