From: Brian Candler Date: 2009-02-24T22:18:05+09:00 Subject: Re: encoding problem with tr() and hash keys Do One wrote: > Brian Candler wrote: >> But now I think I understand the problem, it's easy to find more >> examples of the same brokenness. Here's one: >> >> #encoding: utf-8 >> a = "a" >> b = "aß" >> b = b.delete("ß") >> h = {a => 1} >> p h.key?(a) #true >> p h.key?(b) #false !! > > This is still false even in "fixed" 1.9.2dev. Probably you should report > it. :) It's Not My Problem[TM], because I don't use 1.9 and have no intention of doing so for the foreseeable future. The semantics of Strings are now so complex that they are not even documented (except as reverse-engineered by some third parties for commercial books) - so how can you complain when they do something you don't expect? Ruby <=1.8.6 is an old friend. But for me, Ruby >=1.9 is more like a Rottweiler. I'm sure Rottweilers can make great companions to the right sort of owners. B. -- Posted via http://www.ruby-forum.com/.