From: Vladimir Sizikov Date: 2008-01-16T05:34:15+09:00 Subject: Incorrect Date.to_s behavior Hi, There was a bug report against JRuby, which turned out against MRI as well. The following simple example: require 'date'; Date.new.freeze.to_s Produces: TypeError: can't modify frozen object from (eval):4:in `jd' from /usr/lib/ruby/1.8/date.rb:1041:in `__21769__' from (eval):4:in `civil' from /usr/lib/ruby/1.8/date.rb:1056:in `year' from /usr/lib/ruby/1.8/date/format.rb:230:in `strftime' from /usr/lib/ruby/1.8/date/format.rb:201:in `gsub' from /usr/lib/ruby/1.8/date/format.rb:201:in `strftime' from /usr/lib/ruby/1.8/date.rb:1343:in `to_s' On both, 1.8.6 and 1.9.0, but was working correctly on 1.8.5. Ideally, it seems, to_s should not really modify the object, or am I missing something? Thanks, --Vladimir