[Bug #1976] Errors in test/fileutils/test_fileutils.rb

Bug #1976: Errors in test/fileutils/test_fileutils.rb
http://redmine.ruby-lang.org/issues/show/1976

e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.9.2dev (2009-08-21 trunk 24613) [i686-linux]

e$B4D6-$K$h$C$F$Oe(B test_fileutils.rb
e$B$G%(%i!<$K$J$k$3$H$,$"$k$h$&$G$9!#e(B

  1. Error:
    test_rm_f(TestFileUtils):
    TypeError: can’t convert Array into String
    /home/kazu/wc/ruby/trunk/test/fileutils/test_fileutils.rb:420:in
    `test_rm_f’

  2. Error:
    test_rm_f(TestFileUtilsNoWrite):
    TypeError: can’t convert Hash into String
    /home/kazu/wc/ruby/trunk/test/fileutils/test_nowrite.rb:78:in
    `test_rm_f’

  3. Error:
    test_rm_rf(TestFileUtilsNoWrite):
    TypeError: can’t convert Hash into String
    /home/kazu/wc/ruby/trunk/test/fileutils/test_nowrite.rb:84:in
    `test_rm_rf’

e$B>u67$rD4$Y$F$_$k$He(B FileUtils::NoWrite e$B$Ne(B rm_rf e$B$Ne(B
super e$B$Ge(B mkmf.rb e$B$Ne(B rm_rf e$B$,8F$P$l$F$$$^$7$?!#e(B

e$B$=$N$H$-$Ne(B self.class.ancestors e$B$Oe(B
[TestFileUtilsNoWrite, FileUtils::NoWrite, Test::Unit::TestCase,
Test::Unit::Ass
ertions, MiniTest::Unit::TestCase, MiniTest::Assertions, Object,
JSON::Ext::Gene
rator::GeneratorMethods::Object, RakeFileUtils, FileUtils,
FileUtils::StreamUtil
s_, PP::ObjectMixin, Kernel, BasicObject]
e$B$H$J$C$F$$$F!"e(B FileUtils::NoWrite e$B$He(B FileUtils e$B$N4V$Ke(B
Object e$B$,F~$C$F$$$ke(B (e$B$3$3$Ke(B mkmf.rb e$B$Ge(B rm_rf
e$B$,Dj5A$5$l$F$$$ke(B) e$B$N$,860x$N$h$&$G$9!#e(B

e$B0J2<$N$h$&$K$9$k$H:F8=$G$-$^$9!#e(B

% ruby-trunk -r mkmf -r fileutils -e ’
include FileUtils
class C
include FileUtils::NoWrite
def hoge
p self.class.ancestors
rm_rf(“hoge”)
end
end
C.new.hoge’
[C, FileUtils::NoWrite, Object, FileUtils, FileUtils::StreamUtils_,
Kernel, BasicObject]
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/mkmf.rb:201:in []': can't convert Hash into String (TypeError) from /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/mkmf.rb:201:inrm_rf’
from
/home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/fileutils.rb:1556:in rm_rf' from -e:7:inhoge’
from -e:10:in `’
%

e$B%A%1%C%He(B #1976 e$B$,99?7$5$l$^$7$?!#e(B (by Kazuhiro NISHIYAMA)

ancestors e$B$G$o$+$k$h$&$Ke(B rake e$B$,e(B include FileUtils
e$BAjEv$K$J$C$F$$$F!"e(B
rake e$B$He(B mkmf e$B$NN>J}$,e(B require
e$B:Q$_$N;~$K%(%i!<$K$J$k$h$&$G$9!#e(B

% ruby-trunk -r rake -r mkmf -I test/fileutils
test/fileutils/test_nowrite.rb
Loaded suite test/fileutils/test_nowrite
Started
cp data/src tmp/cp
.mkdir dir
.mkdir dir/dir/dir
.mv data/src tmp/mv
.rm data/src
.EE.
Finished in 0.042309 seconds.

  1. Error:
    test_rm_f(TestFileUtilsNoWrite):
    TypeError: can’t convert Hash into String
    test/fileutils/test_nowrite.rb:78:in `test_rm_f’

  2. Error:
    test_rm_rf(TestFileUtilsNoWrite):
    TypeError: can’t convert Hash into String
    test/fileutils/test_nowrite.rb:84:in `test_rm_rf’

8 tests, 186 assertions, 0 failures, 2 errors, 0 skips
% ruby-trunk -r mkmf -r rake -I test/fileutils
test/fileutils/test_nowrite.rb
Loaded suite test/fileutils/test_nowrite
Started
cp data/src tmp/cp
.mkdir dir
.mkdir dir/dir/dir
.mv data/src tmp/mv
.rm data/src
.EE.
Finished in 0.043323 seconds.

  1. Error:
    test_rm_f(TestFileUtilsNoWrite):
    TypeError: can’t convert Hash into String
    test/fileutils/test_nowrite.rb:78:in `test_rm_f’

  2. Error:
    test_rm_rf(TestFileUtilsNoWrite):
    TypeError: can’t convert Hash into String
    test/fileutils/test_nowrite.rb:84:in `test_rm_rf’

8 tests, 186 assertions, 0 failures, 2 errors, 0 skips
%

http://redmine.ruby-lang.org/issues/show/1976

e$B%A%1%C%He(B #1976 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.)

Target version 1.9.2e$B$K%;%C%He(B

Rakee$B$,e(Binclude
FileUtilse$B$9$k$3$H<+BN$O9%$-$K$9$l$P$h$$$H$7$F!"e(Bmake
[email protected]$7$F$b$i$$$?$$$G$9$M!#e(B
make teste$B$G$b<:GT$7$^$9$G$7$g$&$+!#e(B

http://redmine.ruby-lang.org/issues/show/1976

e$B%A%1%C%He(B #1976 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B

Applied in changeset r24620.

http://redmine.ruby-lang.org/issues/show/1976

e$B%A%1%C%He(B #1976 e$B$,99?7$5$l$^$7$?!#e(B (by Yuki S.)

e$B%9%F!<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

This issue was solved with changeset r26009.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


http://redmine.ruby-lang.org/issues/show/1976

At Mon, 7 Sep 2009 13:32:08 +0900,
Yuki S. wrote:

Rakee$B$,e(Binclude FileUtilse$B$9$k$3$H<+BN$O9%$-$K$9$l$P$h$$$H$7$F!"e(Bmake [email protected]$7$F$b$i$$$?$$$G$9$M!#e(B
make teste$B$G$b<:GT$7$^$9$G$7$g$&$+!#e(B

e$B:G=i$N7k2L$Ge(B 5,6,7
e$B$K$J$C$F$$$?$3$H$G$o$+$C$?$+$b$7$l$^$;$s$,!"e(B
e$B:G=i$Oe(B make test-all TESTS=-v e$B$G<:GT$7$F$$$^$7$?!#e(B

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