diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-14 12:50:13 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-14 12:50:13 +0000 |
| commit | a0e26acc7ae10c2a4b42a7bd47c2065c3182af6b (patch) | |
| tree | 58419ad68b8dd2d6d1795c1e45657768c0a5fb4b /test | |
| parent | 4ac65478ad7888105e07bf499e6984c3d29d5db2 (diff) | |
| download | ruby-a0e26acc7ae10c2a4b42a7bd47c2065c3182af6b.tar.gz ruby-a0e26acc7ae10c2a4b42a7bd47c2065c3182af6b.tar.xz ruby-a0e26acc7ae10c2a4b42a7bd47c2065c3182af6b.zip | |
* lib/find.rb (Find.find): narrow rescue region.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_find.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_find.rb b/test/test_find.rb index 7e9f21fdd..6f61dd4f3 100644 --- a/test/test_find.rb +++ b/test/test_find.rb @@ -127,6 +127,15 @@ class TestFind < Test::Unit::TestCase } end + def test_dangling_symlink_stat_error + Dir.mktmpdir {|d| + File.symlink("foo", "#{d}/bar") + assert_raise(Errno::ENOENT) { + Find.find(d) {|f| File.stat(f) } + } + } + end + def test_enumerator Dir.mktmpdir {|d| File.open("#{d}/a", "w") |
