[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

$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

  1. 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<[email protected]$H(Bfail$B$7$J$$$1$I$b(B)

$B%Q%C%A$O0J2<$G$9(B (git diff [email protected]@.(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

$B%A%1%C%H(B #3985 $B$,99?7$5$l$^$7$?!#(B (by Shota F.)

sora_h$B$G$9!#(B
$B0J2<%Q%C%A$N$[$&$,8z2LE*$+$b$7$l$^$;$s!#(B

diff --git test/pathname/test_pathname.rb test/pathname/test_pathname.rb
index 235d0fb…ea709c3 100644
— test/pathname/test_pathname.rb
+++ test/pathname/test_pathname.rb
@@ -309,6 +309,7 @@ class TestPathname < Test::Unit::TestCase
def with_tmpchdir(base=nil)
Dir.mktmpdir(base) {|d|
d = Pathname.new(d).realpath.to_s

  •  File.chown(-1, Process.gid, d)
     Dir.chdir(d) {
       yield d
     }

$B%A%1%C%H(B #3985 $B$,99?7$5$l$^$7$?!#(B (by Akira T.)

$B%9%F!<%?%9(B Assigned$B$+$i(BClosed$B$KJQ99(B
$B?JD=(B % 0$B$+$i(B100$B$KJQ99(B

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

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