I have a class that derives from nothing and is located in /models. I'm
using " my string ".chars to manipulate strings that potentially contain
special chars and replace them with an US-ASCII equivalent.
It did work until yesterday. Now on a linux system "a".chars returns
#<Enumerable::Enumerator:0xb74e3d6c>
While it should return
#<ActiveSupport::Multibyte::Chars:0xb74e1bc0 @string="a">
(the class is contained in
active_support/multibyte/chars.rb)
Therefore the whole app crashes because Enumerable does not have methods
like "downcase" or "'a'.chars[0]" which can handle UTF-8 chars as well.
Using it w/o UTF-8 support ends up in a mess.
Any ideas? How could I require or include
"ActiveSupport::Multibyte::Chars"? Any tests have been negative so far.
I have a class that derives from nothing and is located in /models.
I'm
using " my string ".chars to manipulate strings that potentially
contain
special chars and replace them with an US-ASCII equivalent.
It did work until yesterday. Now on a linux system "a".chars returns
#<Enumerable::Enumerator:0xb74e3d6c>
While it should return
#<ActiveSupport::Multibyte::Chars:0xb74e1bc0 @string="a">
Have you just upgraded to ruby 1.8.7 by any chance? Are you running
rails 2.1 ? versions < 2.1 aren't ready for 1.8.7 IIRC.
Yes, that's it. I've just checked on another linux server that is
running with Ruby 1.8.6.144-2 and a vulnerable openssl version. And it
still works there.
It might be connected to the different ruby version. I'm trying to
downgrade now.