ruby-changes:51734
From: normal <ko1@a...>
Date: Wed, 11 Jul 2018 17:33:38 +0900 (JST)
Subject: [ruby-changes:51734] normal:r63946 (trunk): spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover files
normal 2018-07-11 17:33:32 +0900 (Wed, 11 Jul 2018) New Revision: 63946 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63946 Log: spec/ruby/security/cve_2018_6914_spec.rb: get rid of leftover files I ran out of inodes in $TMPDIR :< Modified files: trunk/spec/ruby/security/cve_2018_6914_spec.rb Index: spec/ruby/security/cve_2018_6914_spec.rb =================================================================== --- spec/ruby/security/cve_2018_6914_spec.rb (revision 63945) +++ spec/ruby/security/cve_2018_6914_spec.rb (revision 63946) @@ -32,22 +32,25 @@ describe "CVE-2018-6914 is resisted by" https://github.com/ruby/ruby/blob/trunk/spec/ruby/security/cve_2018_6914_spec.rb#L32 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/