diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-11 08:33:32 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-11 08:33:32 +0000 |
commit | 9366d7092f824aeae555f80c9afa645e59822b54 (patch) | |
tree | 607acd6f5af3a39d8b6c2c43e803f16ebfc60114 /spec/ruby/security/cve_2018_6914_spec.rb | |
parent | 3e93bf3b46c42a41fee95fea5d0679e3ac180c1c (diff) |
spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover files
I ran out of inodes in $TMPDIR :<
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/security/cve_2018_6914_spec.rb')
-rw-r--r-- | spec/ruby/security/cve_2018_6914_spec.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/ruby/security/cve_2018_6914_spec.rb b/spec/ruby/security/cve_2018_6914_spec.rb index 1837ca0cef..a40225799d 100644 --- a/spec/ruby/security/cve_2018_6914_spec.rb +++ b/spec/ruby/security/cve_2018_6914_spec.rb @@ -32,22 +32,25 @@ describe "CVE-2018-6914 is resisted by" do it "Tempfile.create by deleting separators" do expect = Dir.glob(@traversal_path + '*').count - Tempfile.create(@traversal_path + 'foo') - actual = Dir.glob(@traversal_path + '*').count - actual.should == expect + Tempfile.create(@traversal_path + 'foo') do + actual = Dir.glob(@traversal_path + '*').count + actual.should == expect + end end it "Dir.mktmpdir by deleting separators" do expect = Dir.glob(@traversal_path + '*').count - Dir.mktmpdir(@traversal_path + 'foo') - actual = Dir.glob(@traversal_path + '*').count - actual.should == expect + Dir.mktmpdir(@traversal_path + 'foo') do + actual = Dir.glob(@traversal_path + '*').count + actual.should == expect + end end it "Dir.mktmpdir with an array by deleting separators" do expect = Dir.glob(@traversal_path + '*').count - Dir.mktmpdir([@traversal_path, 'foo']) - actual = Dir.glob(@traversal_path + '*').count - actual.should == expect + Dir.mktmpdir([@traversal_path, 'foo']) do + actual = Dir.glob(@traversal_path + '*').count + actual.should == expect + end end end |