borasque / borasque.com wrote:
> I found strange behaviour of string.tr:
>
> p "=+=/=".tr("+/=", ",-@")
> got ".,.-."
> expected "@,@-@"
>
> Is this bug in ruby?

It's not a bug. For tr ",-@" is the same as ",-./0123456789:;<=>?@". You have 
to escape the - to use it as a literal "-":
"=+=/=".tr("+/=", ',\-@') #=> "@,@-@"

HTH,
Sebastian
-- 
Jabber: sepp2k / jabber.org
ICQ: 205544826