summaryrefslogtreecommitdiff
path: root/lib/singleton.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-21 08:17:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-21 08:17:18 +0000
commit7e1d69f231ca1de06ee629b0d24d56258067d2e3 (patch)
tree1033c57d071c082dad15e8795c43dcd166198c39 /lib/singleton.rb
parent472672dfe6e968c41c16b81c8db3f0f73d2f825f (diff)
* gc.c (rb_gc): use rb_gc_mark_maybe() to mark registered C
addresses. C variables may not hold valid reference to Ruby objects. [ruby-core:00975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/singleton.rb')
-rw-r--r--lib/singleton.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/singleton.rb b/lib/singleton.rb
index 3c20c13..147b041 100644
--- a/lib/singleton.rb
+++ b/lib/singleton.rb
@@ -156,7 +156,7 @@ module Singleton
@__instance__ = new
ensure
if @__instance__
- def self.instance() @__instance__ end
+ define_method(:instance) {@__instance__}
else
@__instance__ = nil
end