This removes the related tests, and puts the related specs behind
version guards. This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
Calling some syscall functions such as Dir.chroot causes SIGSYS instead
of EPERM on Android.
This change skips all tests that stops the test-suite run.
The result should only be tainted if the path given to the method
was tainted.
The code to always taint the result was added in
a4934a42cb (svn revision 4892) in
2003 by matz. However, the change wasn't mentioned in the
commit message, and it may have been committed by accident.
Skip part of a readline test that uses Reline. Reline in general
would pass the test, but Reline's test mode doesn't raise a
SecurityError if passing a tainted prompt and $SAFE >= 1. This
was hidden earlier because File#path was always returning a
tainted string.
Fixes [Bug #14485]
The result should only be tainted if the path given to the method
was tainted.
The code to always taint the result was added in
a4934a42cb (svn revision 4892) in
2003 by matz. However, the change wasn't mentioned in the
commit message, and it may have been committed by accident.
Skip part of a readline test that uses Reline. Reline in general
would pass the test, but Reline's test mode doesn't raise a
SecurityError if passing a tainted prompt and $SAFE >= 1. This
was hidden earlier because File#path was always returning a
tainted string.
Fixes [Bug #14485]
* file.c (rb_file_setuid_p): rdoc for IO object support
(rb_file_sgid_p): ditto (rb_file_sticky_p): ditto
* NEWS: inform users of new feature
* test/file/test_file_exhaustive.rb (io_open): wrapper for bare IO
object (test_suid): test for bare IO support (test_sgid): ditto
(test_sticky): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/file.c (IS_ABSOLUTE_PATH_P): home directory should not be
a relative path regardless a drive letter. PathIsRelativeW
returns FALSE on such path. [ruby-core:86356] [Bug #14638]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_utime_symlinkfile):
under some condition, symlink file is also affected by utimes()
on Linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb (test_utime_symlinkfile): investigate
failures on some platforms. wait a second to tell if symlink
atime is changed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* TestFileExhaustive#test_atime: It fails with nano-sec precise.
I changed to use unixtime for this assertion for APFS.
* TestFileExhaustive#test_expand_path: skip assertion when given
invalid charactor on APFS.
[Bug #13816][ruby-core:82383]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (rb_file_join): join using "/" always, not a constant.
and fix the document. [ruby-core:79579] [Bug #13223]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (rb_default_home_dir): resolve home directory from the
system database when HOME is not set. [Feature #12695]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_expand_path_compose):
normalization is meaningless unless file system encoding is UTF.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_expand_path_compose):
valid only on OS X.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* file.c (append_fspath): normalize directory name to be appended
on OS X. [ruby-core:75957] [Ruby trunk Bug#12483]
https://github.com/rails/rails/issues/25303#issuecomment-224834804
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_flock_shared): open
in writable mode for exclusive lock.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_dirname): assert same as
the parent directory, not ascendant directories.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_realpath_mount_point):
test for r53688.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (test_readlink_junction): test
for r53689.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb: use assert_predicate and
assert_not_predicate for better failure messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (NTFS): flag for test of NTFS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_file_exhaustive.rb (POSIX): flag for test of
POSIX-like filesystems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e