Method redefined warning depends GC?

test-all $B$r(B -w $B$r$D$1$FF0$+$7$?$H$-$K!"(B
TC_Enumerable#test_to_set = (eval):2: warning: method redefined;
discarding old initialize
/extdisk/chkbuild/chkbuild/tmp/build/ruby-trunk/20111119T160600Z/ruby/lib/set.rb:613:
warning: previous definition of initialize was here
$B$H$$$&7Y9p$,=P$?$j=P$J$+$C$?$j$9$k$3$H$G5$$,$D$$$?$N$G$9$,!“0J2<$N%W%m%0%i%`$N!”(B
GC.start $B$NM-L5$G7Y9p$,=P$k$+=P$J$$$+JQ$o$j$^$9!#(B

$B0J2<$N$h$&$K!"(BGC.start $B$r8F$P$J$$>l9g!"7Y9p$,=P$^$;$s!#(B

% ./ruby -w -e ’
class C
def m() end
alias m2 m
remove_method :m2
#GC.start
def m() end
end

$B0J2<$N$h$&$K!"(BGC.start $B$r8F$V>l9g!"7Y9p$,=P$^$9!#(B

% ./ruby -w -e ’
class C
def m() end
alias m2 m
remove_method :m2
GC.start
def m() end
end

-e:7: warning: method redefined; discarding old m
-e:3: warning: previous definition of m was here

$B$3$l$O$=$&$$$&$b$N$J$s$G$7$g$&$+(B?

% ./ruby -v
ruby 2.0.0dev (2011-11-19 trunk 33791) [x86_64-linux]

[email protected]$G$9!#(B

(11/11/20 9:44), Tanaka A. wrote:

test-all $B$r(B -w $B$r$D$1$FF0$+$7$?$H$-$K!"(B
TC_Enumerable#test_to_set = (eval):2: warning: method redefined;
discarding old initialize

/extdisk/chkbuild/chkbuild/tmp/build/ruby-trunk/20111119T160600Z/ruby/lib/set.rb:613:

warning: previous definition of initialize was here

$B$H$$$&7Y9p$,=P$?$j=P$J$+$C$?$j$9$k$3$H$G5$$,$D$$$?$N$G$9$,!“0J2<$N%W%m%0%i%`$N!”(B

GC.start $B$NM-L5$G7Y9p$,=P$k$+=P$J$$$+JQ$o$j$^$9!#(B
(snip)
$B$3$l$O$=$&$$$&$b$N$J$s$G$7$g$&$+(B?

$B$=$&$$$&$b$N$G$9$M!#(B
$B$3$&$$$&J}K!$b$"$j$^$9!#(B

$ ./ruby -w -e ’
class C
def m() end
old_m ||= instance_method :m
GC.start
def m() end
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs