summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-23 07:52:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-07-23 07:52:38 +0000
commitd1f820b557421dec4a1523ff755fd59567d77c46 (patch)
tree911d5dd077da2c517f4ce45addfedb9731807ffe /lib
parentede8a6c0584be84e19f8cc2a5613ce6394a83cf3 (diff)
downloadruby-d1f820b557421dec4a1523ff755fd59567d77c46.tar.gz
ruby-d1f820b557421dec4a1523ff755fd59567d77c46.tar.xz
ruby-d1f820b557421dec4a1523ff755fd59567d77c46.zip
* gc.c (define_final): should not disclose NODE* to Ruby world.
[ruby-dev:23957] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/date.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/date.rb b/lib/date.rb
index b8c15a420..79a2df113 100644
--- a/lib/date.rb
+++ b/lib/date.rb
@@ -707,11 +707,11 @@ class Date
def once(*ids) # :nodoc:
for id in ids
- module_eval <<-"end;"
+ module_eval <<-"end;", __FILE__, __LINE__
alias_method :__#{id.to_i}__, :#{id.to_s}
private :__#{id.to_i}__
def #{id.to_s}(*args, &block)
- if @__#{id.to_i}__
+ if defined? @__#{id.to_i}__
@__#{id.to_i}__
elsif ! self.frozen?
@__#{id.to_i}__ ||= __#{id.to_i}__(*args, &block)