summaryrefslogtreecommitdiff
path: root/lib/finalize.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
commit7ea2ceddb832b9973694fecac9fe3c30400735ba (patch)
treea9b60dec20fa5f7f52ca7c8113195f2d65728a22 /lib/finalize.rb
parent62e41d3f2e48422bbdf1bb2db83ae60b255b1a1a (diff)
This commit was generated by cvs2svn to compensate for changes in r11,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/finalize.rb')
-rw-r--r--lib/finalize.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/lib/finalize.rb b/lib/finalize.rb
index e934753..9b2ffef 100644
--- a/lib/finalize.rb
+++ b/lib/finalize.rb
@@ -1,9 +1,9 @@
#
-# finalize.rb -
-# $Release Version: $
-# $Revision: 1.2 $
-# $Date: 1997/07/25 02:43:00 $
-# by Keiju ISHITSUKA(SHL Japan Inc.)
+# finalizer.rb -
+# $Release Version: 0.2$
+# $Revision: 1.3 $
+# $Date: 1998/01/09 08:09:49 $
+# by Keiju ISHITSUKA
#
# --
#
@@ -44,14 +44,14 @@
#
module Finalizer
- RCS_ID='-$Header: /home/keiju/var/src/var.lib/ruby/RCS/finalize.rb,v 1.2 1997/07/25 02:43:00 keiju Exp keiju $-'
+ RCS_ID='-$Header: /home/keiju/var/src/var.lib/ruby/RCS/finalize.rb,v 1.3 1998/01/09 08:09:49 keiju Exp keiju $-'
# @dependency: {id => [[dependant, method, *opt], ...], ...}
# 依存関係 R_method(obj, dependant) の追加
def add_dependency(obj, dependant, method = :finalize, *opt)
ObjectSpace.call_finalizer(obj)
- method = method.id unless method.kind_of?(Fixnum)
+ method = method.intern unless method.kind_of?(Integer)
assoc = [dependant, method].concat(opt)
if dep = @dependency[obj.id]
dep.push assoc
@@ -63,8 +63,8 @@ module Finalizer
# 依存関係 R_method(obj, dependant) の削除
def delete_dependency(id, dependant, method = :finalize)
- id = id.id unless id.kind_of?(Fixnum)
- method = method.id unless method.kind_of?(Fixnum)
+ id = id.id unless id.kind_of?(Integer)
+ method = method.intern unless method.kind_of?(Integer)
for assoc in @dependency[id]
assoc.delete_if do
|d, m, *o|
@@ -77,8 +77,8 @@ module Finalizer
# 依存関係 R_*(obj, dependant) の削除
def delete_all_dependency(id, dependant)
- id = id.id unless id.kind_of?(Fixnum)
- method = method.id unless method.kind_of?(Fixnum)
+ id = id.id unless id.kind_of?(Integer)
+ method = method.intern unless method.kind_of?(Integer)
for assoc in @dependency[id]
assoc.delete_if do
|d, m, *o|
@@ -90,8 +90,8 @@ module Finalizer
# 依存関係 R_method(*, dependant) の削除
def delete_by_dependant(dependant, method = :finalize)
- method = method.id unless method.kind_of?(Fixnum)
- for id in @dependency.keys
+ method = method.intern unless method.kind_of?(Integer)
+ for id in Dependency.keys
delete(id, dependant, method)
end
end
@@ -106,8 +106,8 @@ module Finalizer
# 依存関連 R_method(obj, dependtant) で結ばれるdependantをfinalizeす
# る.
def finalize_dependency(id, dependant, method = :finalize)
- id = id.id unless id.kind_of?(Fixnum)
- method = method.id unless method.kind_of?(Fixnum)
+ id = id.id unless id.kind_of?(Integer)
+ method = method.intern unless method.kind_of?(Integer)
for assocs in @dependency[id]
assocs.delete_if do
|d, m, *o|
@@ -121,8 +121,8 @@ module Finalizer
# 依存関連 R_*(obj, dependtant) で結ばれるdependantをfinalizeする.
def finalize_all_dependency(id, dependant)
- id = id.id unless id.kind_of?(Fixnum)
- method = method.id unless method.kind_of?(Fixnum)
+ id = id.id unless id.kind_of?(Integer)
+ method = method.intern unless method.kind_of?(Integer)
for assoc in @dependency[id]
assoc.delete_if do
|d, m, *o|
@@ -134,7 +134,7 @@ module Finalizer
# 依存関連 R_method(*, dependtant) で結ばれるdependantをfinalizeする.
def finalize_by_dependant(dependant, method = :finalize)
- method = method.id unless method.kind_of?(Fixnum)
+ method = method.intern unless method.kind_of?(Integer)
for id in @dependency.keys
finalize(id, dependant, method)
end