Bug #3985: test_pathname fail on OSX via cron
http://redmine.ruby-lang.org/issues/show/3985
$B5/I<<T(B: Shota F.
$B%9%F!<%?%9(B: Open, $BM%@john(B: Normal
$B%+%F%4%j(B: test
ruby -v: ruby 1.9.3dev (2010-10-26 trunk 29598) [x86_64-darwin10.4.0]
Shota F. (sora_h)$B$G$9(B
pathname$B$N(Btest_grpowned?$B$,(Bcron$B>e$G(Bfail$B$7$^$9!#(B
- Failure:
test_grpowned?(TestPathname)
[/Users/sorah/git/ruby/ruby/test/pathname/test_pathname.rb:998]:
expected but was
.
$B860x$O(BOSX$B$N(B/tmp$B0J2<$N(Bdirectory$B$,(Bwheel$B$K$J$k$+$i$G!"(BFile.chown$B$9$k$3$H$G2r>C$7$^$7$?!#(B
($B$J$<$+%3%^%s%I%i%$%s$+$i$N<B9T$@$H(Bfail$B$7$J$$$1$I$b(B)
$B%Q%C%A$O0J2<$G$9(B (git diff --no-prefix$B$G@8@.(B):
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