-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 9.4.12.0
- 9.4.11.0
- 9.4.10.0
- 9.4.9.0
- 9.4.8.0
- 9.4.7.0
- 9.4.6.0
- 9.4.5.0
- 9.4.4.0
- 9.4.3.0
- 9.4.2.0
- 9.4.1.0
- 9.4.0.0
- 9.3.15.0
- 9.3.14.0
- 9.3.13.0
- 9.3.12.0
- 9.3.11.0
- 9.3.10.0
- 9.3.9.0
- 9.3.8.0
- 9.3.7.0
- 9.3.6.0
- 9.3.5.0
- 9.3.4.0
- 9.3.3.0
- 9.3.2.0
- 9.3.1.0
- 9.3.0.0
- 9.2.21.0
- 9.2.20.1
- 9.2.20.0
- 9.2.19.0
- 9.2.18.0
- 9.2.17.0
- 9.2.16.0
- 9.2.15.0
- 9.2.14.0
- 9.2.13.0
- 9.2.12.0
- 9.2.11.1
- 9.2.11.0
- 9.2.10.0
- 9.2.9.0
- 9.2.8.0
- 9.2.7.0
- 9.2.6.0
- 9.2.5.0
- 9.2.4.1
- 9.2.4.0
- 9.2.3.0
- 9.2.2.0
- 9.2.1.0
- 9.2.0.0
- 9.1.17.0
- 9.1.16.0
- 9.1.15.0
- 9.1.14.0
- 9.1.13.0
- 9.1.12.0
- 9.1.11.0
- 9.1.10.0
- 9.1.9.0
- 9.1.8.0
- 9.1.7.0
- 9.1.6.0
- 9.1.5.0
- 9.1.4.0
- 9.1.3.0
- 9.1.2.0
- 9.1.1.0
- 9.1.0.0
- 9.0.5.0
- 9.0.4.0
- 9.0.3.0
- 9.0.1.0
- 9.0.0.0
- 9.0.0.0.rc2
- 9.0.0.0.rc1
Showing
19 changed files
with
174 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
fails:FileTest.directory? returns true if the argument is a directory | ||
fails:FileTest.directory? returns false if the argument is not a directory | ||
fails:FileTest.directory? accepts an object that has a #to_path method | ||
fails:FileTest.directory? raises a TypeError when passed an Integer | ||
fails:FileTest.directory? raises a TypeError when passed nil | ||
fails:FileTest.directory? returns false if the argument is an IO that's not a directory | ||
fails:FileTest.directory? returns true if the argument is an IO that is a directory | ||
fails:FileTest.directory? calls #to_io to convert a non-IO object |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
fails:FileTest.grpowned? returns true if the file exist | ||
fails:FileTest.grpowned? accepts an object that has a #to_path method | ||
fails:FileTest.grpowned? takes non primary groups into account | ||
fails:FileTest.grpowned? returns false if the file doesn't exist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,2 @@ | ||
fails:FileTest.size? returns the size of the file if it exists and is not empty | ||
fails:FileTest.size? accepts a String-like (to_str) parameter | ||
fails:FileTest.size? accepts an object that has a #to_path method | ||
fails:FileTest.size? returns nil if file_name doesn't exist or has 0 size | ||
fails:FileTest.size? returns nil if file_name is empty | ||
fails:FileTest.size? accepts a File argument | ||
fails:FileTest.size returns the size of the file if it exists and is not empty | ||
fails:FileTest.size accepts a String-like (to_str) parameter | ||
fails:FileTest.size accepts an object that has a #to_path method | ||
fails:FileTest.size raises an error if file_name doesn't exist | ||
fails:FileTest.size returns 0 if the file is empty | ||
fails:FileTest.size accepts a File argument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
fails:FileTest.sticky? returns false if the file dies not exist | ||
fails:FileTest.sticky? returns true if the named file has the sticky bit, otherwise false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
truffle/src/main/ruby/core/rubinius/common/file_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# Copyright (c) 2007-2014, Evan Phoenix and contributors | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright notice | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# * Neither the name of Rubinius nor the names of its contributors | ||
# may be used to endorse or promote products derived from this software | ||
# without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
module FileTest | ||
def blockdev?(path) | ||
File.blockdev? path | ||
end | ||
|
||
def chardev?(path) | ||
File.chardev? path | ||
end | ||
|
||
def directory?(path) | ||
File.directory? path | ||
end | ||
|
||
def executable?(path) | ||
File.executable? path | ||
end | ||
|
||
def executable_real?(path) | ||
File.executable_real? path | ||
end | ||
|
||
def exist?(path) | ||
File.exist? path | ||
end | ||
alias_method :exists?, :exist? | ||
|
||
def file?(path) | ||
File.file? path | ||
end | ||
|
||
def grpowned?(path) | ||
File.grpowned? path | ||
end | ||
|
||
def identical?(a, b) | ||
File.identical? a, b | ||
end | ||
|
||
def owned?(path) | ||
File.owned? path | ||
end | ||
|
||
def pipe?(path) | ||
File.pipe? path | ||
end | ||
|
||
def readable?(path) | ||
File.readable? path | ||
end | ||
|
||
def readable_real?(path) | ||
File.readable_real? path | ||
end | ||
|
||
def setgid?(path) | ||
File.setgid? path | ||
end | ||
|
||
def setuid?(path) | ||
File.setuid? path | ||
end | ||
|
||
def size(path) | ||
File.size path | ||
end | ||
|
||
def size?(path) | ||
File.size? path | ||
end | ||
|
||
def socket?(path) | ||
File.socket? path | ||
end | ||
|
||
def sticky?(path) | ||
File.sticky? path | ||
end | ||
|
||
def symlink?(path) | ||
File.symlink? path | ||
end | ||
|
||
def writable?(path) | ||
File.writable? path | ||
end | ||
|
||
def writable_real?(path) | ||
File.writable_real? path | ||
end | ||
|
||
def zero?(path) | ||
File.zero? path | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright (c) 2007-2014, Evan Phoenix and contributors | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright notice | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# * Neither the name of Rubinius nor the names of its contributors | ||
# may be used to endorse or promote products derived from this software | ||
# without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
module FileTest | ||
module_function :blockdev?, | ||
:chardev?, | ||
:directory?, | ||
:executable?, | ||
:executable_real?, | ||
:exist?, | ||
:exists?, | ||
:file?, | ||
:grpowned?, | ||
:identical?, | ||
:owned?, | ||
:pipe?, | ||
:readable?, | ||
:readable_real?, | ||
:setgid?, | ||
:setuid?, | ||
:size, | ||
:size?, | ||
:socket?, | ||
:sticky?, | ||
:symlink?, | ||
:writable?, | ||
:writable_real?, | ||
:zero? | ||
end |