e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B
e$B%j%U%!%l%s%9%^%K%e%"%k$N:n6H$r$7$F$$$F5$$,IU$$$?$N$G$9$,!"e(B
finalize e$B$re(B require e$B$9$k$H0J2<$N$h$&$J7Y9p$,=P$^$9!#e(B
$ ruby-1.8 -rfinalize -ve ‘’
ruby 1.8.5 (2006-12-15 patchlevel 5000) [i686-linux]
/usr/local/lib/ruby/1.8/finalize.rb:192: warning:
ObjectSpace::add_finalizer is deprecated; use define_finalizer
e$B8=:_$G$Oe(B ObjectSpace.define_finalizer(obj, proc)
e$B$,I8=`$G$"$k$o$1$G!“e(B
e$BF1MM$N5!G=$rDs6!$9$ke(B lib/finalize e$B$O<B<AE*$Ke(B obsolete
e$B$J$s$@$H;W$$$^$9!#e(B
e$B%j%U%!%l%s%9%^%K%e%”%k$Ke(B finalize e$B$Oe(B obsolete
e$B$@$H=q$-2C$($A$c$C$F$bNI$$$G$7$g$&$+!#e(B
e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B
In message “Re: [ruby-dev:30051] lib/finalize may be obsolete?”
on Mon, 25 Dec 2006 21:59:27 +0900, sheepman
[email protected] writes:
|e$B8=:_$G$Oe(B ObjectSpace.define_finalizer(obj, proc) e$B$,I8=`$G$"$k$o$1$G!“e(B
|e$BF1MM$N5!G=$rDs6!$9$ke(B lib/finalize e$B$O<B<AE*$Ke(B obsolete e$B$J$s$@$H;W$$$^$9!#e(B
|e$B%j%U%!%l%s%9%^%K%e%”%k$Ke(B finalize e$B$Oe(B obsolete e$B$@$H=q$-2C$($A$c$C$F$bNI$$$G$7$g$&$+!#e(B
e$B$*4j$$$7$^$9!#e(B
okkez e$B$G$9!#e(B
Finalizer
e$B$N3F%a%=%C%I$N@bL@$r=q$3$&$H$7$F!";n$7$KF0$+$=$&$H$7$?$iF0$-$^$;$s$G$7$?!#e(B
e$B%j%U%!%l%s%9$K$Oe(B obsolete
e$B$H=q$-$^$9$,!"F0:n$7$J$$%i%$%V%i%j$,I8=`E:IU$5$l$F$$$k$N$Oe(B
e$B$A$g$C$H$*$+$7$$$N$G$O$J$$$+$H;W$$$^$9!#e(B
e$B%(%i!<%a%C%;!<%8$K$h$k$He(B Symbol#intern
e$B$,L5$$$?$aF0$+$J$$$h$&$G$9!#e(B
---- e$BF0$+$J$$%9%/%j%W%He(B -----
require ‘finalize’
a = ‘’
b = ‘’
Finalizer.add(a,b)
---- e$B$3$3$^$Ge(B ----
e$B%(%i!<%a%C%;!<%8e(B
/usr/lib/ruby/1.8/finalize.rb:192: warning: ObjectSpace::add_finalizer
is deprecated; use define_finalizer
/usr/lib/ruby/1.8/finalize.rb:59: warning: ObjectSpace::call_finalizer
is deprecated; use define_finalizer
/usr/lib/ruby/1.8/finalize.rb:60:in add': undefined method
intern’
for :finalize:Symbol (NoMethodError)
from finalize.rb:6
2006/12/25 22:50 Yukihiro M. [email protected]: