[#39052] Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yugui <yugui@...>

Redmine管理用プロジェクトに報告されてしまったので転送します。

12 messages 2009/08/09
[#39264] Re: Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc 4.2.0 — Yutaka Kanemoto <kinpoco@...> 2009/09/08

金本と申します。

[#39107] [Bug #1952] cannot stop with Ctrl+C — Usaku NAKAMURA <redmine@...>

Bug #1952: cannot stop with Ctrl+C

14 messages 2009/08/18

[#39167] [Bug #2000] Change the license to "GPLv2+ or Ruby's original". — Mamoru Tasaka <redmine@...>

Bug #2000: Change the license to "GPLv2+ or Ruby's original".

11 messages 2009/08/26

[#39193] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...>

In article <200908281827.n7SIRbaX003476@ci.ruby-lang.org>,

16 messages 2009/08/29
[#39194] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39195] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a988633.9553f10a.4496.483e@mx.google.com>,

[#39196] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/29

なかだです。

[#39197] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Tanaka Akira <akr@...> 2009/08/29

In article <4a989f76.1602be0a.3de4.1131@mx.google.com>,

[#39198] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Yukihiro Matsumoto <matz@...> 2009/08/29

まつもと ゆきひろです

[#39206] Re: [ruby-cvs:31917] Ruby:r24699 (trunk): * lib/tmpdir.rb (Dir.mktmpdir): removed thread race condition. — Nobuyoshi Nakada <nobu@...> 2009/08/31

なかだです。

[ruby-dev:39150] [Bug #1976] Errors in test/fileutils/test_fileutils.rb

From: Kazuhiro NISHIYAMA <redmine@...>
Date: 2009-08-21 13:13:12 UTC
List: ruby-dev #39150
Bug #1976: Errors in test/fileutils/test_fileutils.rb
http://redmine.ruby-lang.org/issues/show/1976

起票者: Kazuhiro NISHIYAMA
ステータス: Open, 優先度: Normal
ruby -v: ruby 1.9.2dev (2009-08-21 trunk 24613) [i686-linux]

環境によっては test_fileutils.rb でエラーになることがあるようです。

  5) 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'

  6) 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'

  7) 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'

状況を調べてみると FileUtils::NoWrite の rm_rf の super で mkmf.rb の rm_rf が呼ばれていました。

そのときの self.class.ancestors は
[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]
となっていて、 FileUtils::NoWrite と FileUtils の間に Object が入っている (ここに mkmf.rb で rm_rf が定義されている) のが原因のようです。

以下のようにすると再現できます。

% 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:in `rm_rf'
        from /home/kazu/opt/ruby-trunk/lib/ruby/1.9.1/fileutils.rb:1556:in `rm_rf'
        from -e:7:in `hoge'
        from -e:10:in `<main>'
%


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next