Extend Tempfile

e$B0J2<$N$h$&$Ke(B Tempfile e$B$N%$%s%9%?%s%9$Ke(B extend
e$B$9$k$H!"$=$N$3e(B
e$B$H$re(B === e$B$G8!=P$G$-$^$;$s!#e(B

% ./ruby -v -rtempfile -e ’
o = Tempfile.new(“foo”)
module M
end
p M === o
o.extend M
p M === o

ruby 1.9.0 (2008-01-05 revision 0) [i686-linux]
false
false

1.8 e$B$G$O$G$-$^$9!#e(B

% ruby-1.8 -v -rtempfile -e ’
o = Tempfile.new(“foo”)
module M
end
p M === o
o.extend M
p M === o

ruby 1.8.6 (2007-12-14 patchlevel 5000) [i686-linux]
false
true

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