Yukihiro Matsumoto wrote: > require 'Date' > d = Date.new > d.freeze > d.to_s # <--- this line fails > > Date objects are modifies itself to cache calculated result. Since > no other self-modifying methods are exposed, you don't have to freeze > it in general. I would still consider it a bug. #to_s gets called implicitely in a lot of cases (<%=, puts, Array#join, #{}), so it should never fail because the object is frozen (it shouldn't have side effects.) maybe Date could cache the result only if it's not frozen? or it could initialize the cache values (@__16641__ and @__16209__, whatever they are...) on creation. they are both arrays, so they can be modified even if the Date object itself is frozen: irb(main):029:0> d = Date.today => #<Date: 4908883/2,0,2299161> irb(main):030:0> d.instance_eval { p instance_variables } ["@of", "@ajd", "@sg"] => nil irb(main):031:0> d.to_s => "2007-12-07" irb(main):032:0> d.instance_eval { p instance_variables } ["@of", "@ajd", "@__16641__", "@__16209__", "@sg"] => nil irb(main):033:0> d.instance_eval { p [@__16641__, @__16209__] } [[[2007, 12, 7]], [2454442]] => nil [murphy]