e$B0J2<$N$h$&$K!"e(BObject e$B$He(B Array e$B$Ke(B m
e$B$H$$$&%a%=%C%I$rDj5A$7!"e(B
[] e$B$KBP$7e(B delegate e$B7PM3$Ge(B m e$B$r8F$V$H!"e(BArray
e$B$G$J$/e(B Object e$B$Ke(B
e$BDj5A$5$l$?e(B m e$B$,8F$P$l$F$7$^$$$^$9!#e(B
% ./ruby -rdelegate -ve ’
class Object
def m
p :o
end
end
class Array
def m
p :a
end
end
class A < DelegateClass(Array); end
A.new([]).m
’
ruby 1.9.2dev (2009-09-26 trunk 25102) [i686-linux]
:o
1.8 e$B$G$O!"e(BArray e$B$Ne(B m e$B$,8F$P$l$^$9!#e(B
% ruby-1.8 -rdelegate -ve ’
class Object
def m
p :o
end
end
class Array
def m
p :a
end
end
class A < DelegateClass(Array); end
A.new([]).m
’
ruby 1.8.8dev (2009-09-15 revision 24931) [i686-linux]
:a