TypeError: can't modify frozen string in 1.8.6

i just upgrade ruby from 1.8.5 to 1.8.6. And now i get an error when i'm dealing with dates : TypeError: can't modify frozen string /opt/local/lib/ruby/1.8/date/format.rb:105:in `chomp!' /opt/local/lib/ruby/1.8/date/format.rb:105:in `method_missing' /opt/local/lib/ruby/1.8/date/format.rb:963:in `_parse'

Does someone know where this error come from?

i just upgrade ruby from 1.8.5 to 1.8.6. And now i get an error when i'm dealing with dates : TypeError: can't modify frozen string /opt/local/lib/ruby/1.8/date/format.rb:105:in `chomp!' /opt/local/lib/ruby/1.8/date/format.rb:105:in `method_missing' /opt/local/lib/ruby/1.8/date/format.rb:963:in `_parse'

Does someone know where this error come from?

My memory is that some of the methods in the date/time classes in ruby became private in 1.8.6. Rails 1.2.3 fixes this, but if you're on an earlier version this may be it.

i'm on rails 1.2.3. maybe i should downgrade for a better compatibilty.

Hi --

from ./script/console :

test = User.find 8 test.created_at

TypeError: can't modify frozen string         from /opt/local/lib/ruby/1.8/date/format.rb:105:in `chomp!'         from /opt/local/lib/ruby/1.8/date/format.rb:105:in `method_missing'         from /opt/local/lib/ruby/1.8/date/format.rb:963:in `_parse'         from /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract/schema_definitions.rb: 114:in `string_to_time'         from (eval):1:in `created_at'         from (irb):7

it is not really verbose, but it's all i get.

i just find a related topic : Strange frozen string problem starting rails - Rails - Ruby-Forum i'll try to patch format.rb and tell if it works for me too.

i confirm that it works with this fix...