From: matz@... (Yukihiro Matsumoto) Date: 2001-05-07T17:28:21+09:00 Subject: [ruby-talk:14759] Re: I can't use -w because of date.rb Hi, In message "[ruby-talk:14756] Re: I can't use -w because of date.rb" on 01/05/07, Renald Buter writes: |I am seeing the same thing here. Anyone has a suggestion how to solve it? This might solve it. Probably more general "||=" solution is better, but it works anyway. matz. --- lib/date.rb 2001/01/18 08:43:12 1.7 +++ lib/date.rb 2001/05/06 15:04:52 1.8 @@ -204,3 +204,6 @@ def #{id.id2name}(*args, &block) - (@__#{id.to_i}__ ||= [__#{id.to_i}__(*args, &block)])[0] + unless defined? @__#{id.to_i}__ + @__#{id.to_i}__ = __#{id.to_i}__(*args, &block) + end + @__#{id.to_i}__ end