summaryrefslogtreecommitdiff
path: root/lib/date2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/date2.rb')
-rw-r--r--lib/date2.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/date2.rb b/lib/date2.rb
index 38d477b..ef8bf83 100644
--- a/lib/date2.rb
+++ b/lib/date2.rb
@@ -195,10 +195,10 @@ class Date
def once(*ids)
for id in ids
module_eval <<-"end;"
- alias_method :__#{id}__, #{id}
+ alias_method :__#{id.to_i}__, #{id}
def #{id.id2name}(*args, &block)
- def self.#{id.id2name}(*args, &block); @__#{id}__ end
- @__#{id}__ = __#{id}__(*args, &block)
+ def self.#{id.id2name}(*args, &block); @__#{id.to_i}__ end
+ @__#{id.to_i}__ = __#{id.to_i}__(*args, &block)
end
end;
end