>
> El bug inicial del cual surgio el thread no se reproduce al usar el
> modificador u. (Siempre q los strings y la expresion este ambos en
> utf-8 asumo)


Sí, se reproduce:

irb(main):046:0* res = [ /\303\200/, */\303\200/u*, /À/, /À/u ]
> => [/\303\200/, /\303\200/u, /À/, /À/u]
> irb(main):047:0> res.map &:hash
> => [-279873035, -*279873035*, 429036, 429036]
> irb(main):048:0> res.each { |re| re === "hola" }
> => [/\303\200/, /\303\200/u, /À/, /À/u]
> irb(main):049:0> res.map &:hash
> => [-403010555, -*403010555*, 429036, 429036]
>

Si se utiliza la forma con escaping, el bug se reproduce con o sin /u. Si se
utiliza el caracter directo, el bug no se dispara (con o sin /u). Esto
asumiendo $KCODE == "UTF8".

nachokb
_______________________________________________
Ruby mailing list
[email protected]
http://lista.rubyargentina.com.ar/listinfo.cgi/ruby-rubyargentina.com.ar

Responder a