From: matz@... (Yukihiro Matsumoto) Date: 2000-03-10T18:31:02+09:00 Subject: [ruby-talk:01798] Re: date2 and the new Symbol stuff Hi, In message "[ruby-talk:01796] date2 and the new Symbol stuff" on 00/03/09, Dave Thomas writes: |I could either submit a patch which changed all the {id}'s to |{id.id2name}, or we could change Symbol.to_s to return "julian", not |":julian". Since `#{id}' in the quoted code suppose number to be interpolated, changing Symbol.to_s to return "julian" does not solve the problem. I changed once() like the following, which runs fine on older Ruby too. def once(*ids) for id in ids p id module_eval <<-"end;" alias_method :__#{id.to_i}__, #{id.to_i} def #{id.id2name}(*args, &block) def self.#{id.id2name}(*args, &block); @__#{id.to_i}__ end @__#{id.to_i}__ = __#{id.to_i}__(*args, &block) end end; end end matz.