hi,
Michael Calmer ran into a bug with regexp in ruby 1.8.[1]
Rails sets the $KCODE variable to UTF-8, which changes the meaning of
the \w class.
To quote answer in the bug:
[[[
Ruby 1.8's /\w/u matches [0-9a-zA-Z_] and all non ASCII of Unicode.
]]]
In Ruby 1.9 and JRuby this part of the ruby spec changed and behaves as
expected.
So if you use regexp validations, make sure to keep to use [A-Za-z0-9_]
instead of \w.
hth
darix
[1] http://redmine.ruby-lang.org/issues/show/3047
--
openSUSE - SUSE Linux is my linux
openSUSE is good for you
www.opensuse.org
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-ruby+help(a)opensuse.org