diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-04 01:35:49 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-04 01:35:49 +0000 |
commit | 9cca628f857d60bea34a2ecc416a0c9693b65b8d (patch) | |
tree | ddc55810ae6793c0bba1e2ec2deee98cbf13f925 /test/fileutils | |
parent | 3a3762aaf23e01185697acea5d2d9f1f620aaf2b (diff) | |
download | ruby-9cca628f857d60bea34a2ecc416a0c9693b65b8d.tar.gz |
fileutils.rb: fix error for non-existent entry
* lib/fileutils.rb (FileUtils::Entry_#copy): ensure that the
source entry exists first, to fix error for non-existent entry.
[ruby-core:77885] [Bug #12892]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/fileutils')
-rw-r--r-- | test/fileutils/test_fileutils.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 00441a4cfb..0ff0aadca2 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -361,6 +361,11 @@ class TestFileUtils < Test::Unit::TestCase assert_raise(ArgumentError, bug3588) do cp_r 'tmp2', 'tmp2/new_tmp2' end + + bug12892 = '[ruby-core:77885] [Bug #12892]' + assert_raise(Errno::ENOENT, bug12892) do + cp_r 'non/existent', 'tmp' + end end def test_cp_r_symlink |