File#chown and File.chown should allow nil as first argument
------------------------------------------------------------

                 Key: JRUBY-2397
                 URL: http://jira.codehaus.org/browse/JRUBY-2397
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1
         Environment: Latest JRuby
            Reporter: Vladimir Sizikov
            Assignee: Vladimir Sizikov
             Fix For: JRuby 1.1.1


File.chown and File#chown should allow nil as first argument.
Ruby-doc says: "A nil or -1 owner or group id is ignored."

This causes 5 new rubyspec failures for FileTest:

{noformat}
1)
File.grpowned? return true if the file exist ERROR
Exception occurred during: before :each
can't convert nil into Integer
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:59:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb:2:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `[]'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `it_behaves_like'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb:5:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:50:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb:4:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb:44:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:33:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:77:in `main'
mspec/bin/mspec-ci:73

2)
File.grpowned? return true if the file exist ERROR
Expected Exception but no exception was raised
/opt/work/rbx.git/./mspec/expectations.rb:10:in `fail_with'
/opt/work/rbx.git/./mspec/expectations/should.rb:6:in `should'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb:16:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:60:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb:2:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `[]'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `it_behaves_like'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb:5:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:50:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb:4:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/grpowned_spec.rb:44:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:33:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:77:in `main'
mspec/bin/mspec-ci:73

3)
File::Stat#gid should be able to determine the group owner through a File::Stat 
object ERROR
Exception occurred during: before :each
can't convert nil into Integer
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/gid_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:59:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/gid_spec.rb:3:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/gid_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/gid_spec.rb:44:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:33:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:77:in `main'
mspec/bin/mspec-ci:73

4)
File::Stat#grpowned? return true if the file exist ERROR
Exception occurred during: before :each
can't convert nil into Integer
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/../../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:59:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/../../../shared/file/grpowned.rb:2:in
 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/../../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `[]'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `it_behaves_like'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/grpowned_spec.rb:6:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/grpowned_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:50:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/grpowned_spec.rb:5:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/grpowned_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/file/stat/grpowned_spec.rb:44:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:33:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:77:in `main'
mspec/bin/mspec-ci:73

5)
FileTest.grpowned? return true if the file exist ERROR
Exception occurred during: before :each
can't convert nil into Integer
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:59:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb:2:in
 `/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `[]'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `it_behaves_like'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb:5:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:50:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb:4:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb:44:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:33:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:77:in `main'
mspec/bin/mspec-ci:73

6)
FileTest.grpowned? return true if the file exist ERROR
Expected Exception but no exception was raised
/opt/work/rbx.git/./mspec/expectations.rb:10:in `fail_with'
/opt/work/rbx.git/./mspec/expectations/should.rb:6:in `should'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb:16:in
 `/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:60:in `process'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:56:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb:2:in
 `/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/../../shared/file/grpowned.rb'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `[]'
/opt/work/rbx.git/./mspec/runner/shared.rb:10:in `it_behaves_like'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb:5:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `each'
/opt/work/rbx.git/./mspec/runner/state.rb:46:in `protect'
/opt/work/rbx.git/./mspec/runner/state.rb:50:in `process'
/opt/work/rbx.git/./mspec/runner/mspec.rb:26:in `describe'
/opt/work/rbx.git/./mspec/runner/object.rb:11:in `describe'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb:4:in 
`/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb'
/opt/work/rbx.git/./spec/ruby/1.8/core/filetest/grpowned_spec.rb:44:in `load'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `call'
/opt/work/rbx.git/./mspec/runner/mspec.rb:119:in `protect'
/opt/work/rbx.git/./mspec/runner/mspec.rb:44:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `each'
/opt/work/rbx.git/./mspec/runner/mspec.rb:41:in `files'
/opt/work/rbx.git/./mspec/runner/mspec.rb:33:in `process'
mspec/bin/mspec-ci:66:in `run'
/opt/work/rbx.git/./mspec/bin/script.rb:77:in `main'
mspec/bin/mspec-ci:73

Finished in 66.179000 seconds

1851 files, 6317 examples, 20630 expectations, 2 failures, 4 errors
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to