1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

2000-04-21

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-04-21 07:52:05 +00:00
parent 4f0aeb3cf7
commit cb1b00b4b4

View file

@ -199,7 +199,7 @@ class Date
def once(*ids)
for id in ids
module_eval <<-"end;"
alias_method :__#{id.to_i}__, #{id}
alias_method :__#{id.to_i}__, #{id.inspect}
def #{id.id2name}(*args, &block)
def self.#{id.id2name}(*args, &block); @__#{id.to_i}__ end
@__#{id.to_i}__ = __#{id.to_i}__(*args, &block)