summaryrefslogtreecommitdiff
path: root/lib/finalize.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-07 19:18:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-07 19:18:16 +0000
commit54fdacb12545f40e83b013e7c8207fb5416b1403 (patch)
treea78adc8cdeb42f4a59788e2e5dda13627a130446 /lib/finalize.rb
parent8e3721dfa828464981b5e9f77eff79b815c288d5 (diff)
* class.c (rb_define_method): do not set NOEX_CFUNC if klass is
really a module, whose methods must be safe for reciever's type. * eval.c (rb_eval): nosuper should not be inherited unless the overwritten method is an undef placeholder. * parse.y (primary): allow 'when'-less case statement; persuaded by Sean Chittenden. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/finalize.rb')
-rw-r--r--lib/finalize.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/finalize.rb b/lib/finalize.rb
index 7d86d94..ed1ccc8 100644
--- a/lib/finalize.rb
+++ b/lib/finalize.rb
@@ -52,17 +52,17 @@ module Finalizer
ObjectSpace.call_finalizer(obj)
method = method.intern unless method.kind_of?(Integer)
assoc = [dependant, method].concat(opt)
- if dep = @dependency[obj.id]
+ if dep = @dependency[obj.object_id]
dep.push assoc
else
- @dependency[obj.id] = [assoc]
+ @dependency[obj.object_id] = [assoc]
end
end
alias add add_dependency
# delete dependency R_method(obj, dependant)
def delete_dependency(id, dependant, method = :finalize)
- id = id.id unless id.kind_of?(Integer)
+ id = id.object_id unless id.kind_of?(Integer)
method = method.intern unless method.kind_of?(Integer)
for assoc in @dependency[id]
assoc.delete_if do
@@ -76,7 +76,7 @@ module Finalizer
# delete dependency R_*(obj, dependant)
def delete_all_dependency(id, dependant)
- id = id.id unless id.kind_of?(Integer)
+ id = id.object_id unless id.kind_of?(Integer)
method = method.intern unless method.kind_of?(Integer)
for assoc in @dependency[id]
assoc.delete_if do
@@ -104,7 +104,7 @@ module Finalizer
# finalize the depandant connected by dependency R_method(obj, dependtant)
def finalize_dependency(id, dependant, method = :finalize)
- id = id.id unless id.kind_of?(Integer)
+ id = id.object_id unless id.kind_of?(Integer)
method = method.intern unless method.kind_of?(Integer)
for assocs in @dependency[id]
assocs.delete_if do
@@ -119,7 +119,7 @@ module Finalizer
# finalize all dependants connected by dependency R_*(obj, dependtant)
def finalize_all_dependency(id, dependant)
- id = id.id unless id.kind_of?(Integer)
+ id = id.object_id unless id.kind_of?(Integer)
method = method.intern unless method.kind_of?(Integer)
for assoc in @dependency[id]
assoc.delete_if do