From: Denis Defreyne Date: 2011-09-03T17:13:28+09:00 Subject: [ruby-core:39245] [Ruby 1.8 - Bug #5270] Date#freeze causes memoized Date methods to fail Issue #5270 has been updated by Denis Defreyne. File date-once.patch added Forgot to attach the patch. ---------------------------------------- Bug #5270: Date#freeze causes memoized Date methods to fail http://redmine.ruby-lang.org/issues/5270 Author: Denis Defreyne Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10.8.0] When freezing a Date object, memoized methods will fail because the memoized value cannot be stored on the frozen object. This is because memoized values are stored as instance variables on the object, and those are immutable for frozen objects. Attached to this bug report is a test case, as well as a patch that fixes the issue (and also includes the test case). -- http://redmine.ruby-lang.org