The rubydoc for File.grpowned? states: Returns false on Windows.
But JRuby fails RubySpecs:
D:\work\jruby-dev\rubyspec.git>mspec -t j core\filetest\grpowned_spec.rb
jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2010-01-10 c3a86fb) (Java HotSpot(TM) Client VM 1.6.0_17) [x86-java]
FileTest.grpowned? return false if the file exist FAILED
to equal false
Which is our goal for this problem?
I think that since ruby doc explicitly states that: "Returns false on Windows.", JRuby should behave as specified (returning false).
This also causes yet another RubySpec failure for File.grpowned? as well.
Is this the fix we're talking about? http://gist.github.com/307126
The patch linked to fixes the spec failure for me. And I always get a few test/spec failures when using Windows, but from what I can see the patch doesn't add any new ones. Recommend applying patch and closing bug.
The patch provided by headius is fine,
C:\Develop\rubyspec>mspec -t j core\filetest\grpowned_spec.rb
jruby 1.6.0.RC2 (ruby 1.8.7 patchlevel 330) (2011-02-25 cf8d961) (Java HotSpot(TM) Client VM 1.6.0_16) [Windows XP-x86-java]
Finished in 0.062000 seconds
1 file, 2 examples, 2 expectations, 0 failures, 0 errors
I've submitted a pull request with his patch.
Merged in 5a2b3488.