I can't figure out the need for the custom implementation of a hash table. Some of the comments imply it used to provide some kind of non-standard concurrency behaviour, as if rehash could be run in parallel with reads, and it then it looks like the lock was added later, as that covers rehash anyway and createSymbol talks about 'trying again' with the lock, when it already has it. Very strange. I'm sure there's a reason why this is as it is, but until we can work that out (I asked on IRC but no info yet) I think we should just use a standard hash map. Can you get the same spec passing with just a HashMap instead?

If we were to use this code anyway, I'd prefer sharing it between Truffle and normal JRuby, through making it generic for the RubySymbol type. And finally if we were to decide not to do that even, we should include the copyright from the file where it came from.