mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	* test/test_tempfile.rb (test_{new,create}_traversal_dir): should not assume t
				
					
				
			is always set. if `t` is nil, `NoMethodError` will be raised and the real cause will be hidden. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									c7d4c59872
								
							
						
					
					
						commit
						97d610becd
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -391,7 +391,7 @@ puts Tempfile.new('foo').path
 | 
			
		|||
    actual = Dir.glob(TRAVERSAL_PATH + '*').count
 | 
			
		||||
    assert_equal expect, actual
 | 
			
		||||
  ensure
 | 
			
		||||
    t.close!
 | 
			
		||||
    t&.close!
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_create_traversal_dir
 | 
			
		||||
| 
						 | 
				
			
			@ -400,6 +400,6 @@ puts Tempfile.new('foo').path
 | 
			
		|||
    actual = Dir.glob(TRAVERSAL_PATH + '*').count
 | 
			
		||||
    assert_equal expect, actual
 | 
			
		||||
  ensure
 | 
			
		||||
    t.close
 | 
			
		||||
    t&.close
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue