From: Shota Fukumori Date: 2010-10-26T20:23:50+09:00 Subject: [ruby-dev:42458] [Ruby 1.9-Bug#3985][Open] test_pathname fail on OSX via cron Bug #3985: test_pathname fail on OSX via cron http://redmine.ruby-lang.org/issues/show/3985 起票者: Shota Fukumori ステータス: Open, 優先度: Normal カテゴリ: test ruby -v: ruby 1.9.3dev (2010-10-26 trunk 29598) [x86_64-darwin10.4.0] Shota Fukumori (sora_h)です pathnameのtest_grpowned?がcron上でfailします。 1) Failure: test_grpowned?(TestPathname) [/Users/sorah/git/ruby/ruby/test/pathname/test_pathname.rb:998]: expected but was . 原因はOSXの/tmp以下のdirectoryがwheelになるからで、File.chownすることで解消しました。 (なぜかコマンドラインからの実行だとfailしないけども) パッチは以下です (git diff --no-prefixで生成): diff --git test/pathname/test_pathname.rb test/pathname/test_pathname.rb index 235d0fb..86b85b8 100644 --- test/pathname/test_pathname.rb +++ test/pathname/test_pathname.rb @@ -995,6 +995,7 @@ class TestPathname < Test::Unit::TestCase skip "Unix file owner test" if DOSISH with_tmpchdir('rubytest-pathname') {|dir| open("f", "w") {|f| f.write "abc" } + File.chown(-1, Process.gid, "f") assert_equal(true, Pathname("f").grpowned?) } end ---------------------------------------- http://redmine.ruby-lang.org