aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
Commit message (Collapse)AuthorAgeFilesLines
* Of course, opened file is not able to unlink on Windowsusa2017-05-191-0/+1
| | | | | | | | * test/test_tempfile.rb (test_create_with_block): close the tempfile before unlink. fixed a failure on Windows introduced at r58791. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tempfile.rb: remove in Tempfile.createnobu2017-05-191-0/+6
| | | | | | | * lib/tempfile.rb (Tempfile.create): should not fail even if the temporary file has been removed in the block, just ignore. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix bug of Tempfile#size if nothing is written [Bug #13198]glass2017-03-141-0/+7
| | | | | | | | * lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing is written. Tempfile#size should return 0 in this case. The patch is from nobu <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* leakchecker.rb: get rid of uninitialized Tempfilenobu2017-01-271-0/+4
| | | | | | | | * test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of errors on uninitialized Tempfile, which can be left when Dir.tmpdir failed or by Tempfile.allocate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/tempfile.rb: Specify frozen_string_literal: true.kazu2017-01-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb: provide default basename parametersonots2016-09-261-0/+9
| | | | | | | for Tempfile.create. [Feature #11965] Patch by Yuki Kurihara * test/test_tempfile.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use qualified namesnobu2016-08-301-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: use assert_filenobu2016-01-081-4/+4
| | | | | | | * test/test_tempfile.rb (test_create_with{,out}_block): use assert_file for descriptive failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: use assert_predicatenobu2015-05-311-4/+4
| | | | | | | * test/test_tempfile.rb: use assert_predicate and assert_not_predicate for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: use assert_filenobu2015-05-311-5/+5
| | | | | | | * test/test_tempfile.rb: use assert_file for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Remover#call): fixed wrong condition introduced atusa2015-05-301-1/+1
| | | | | | | r50682. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tempfile.rb: use assert_file for more descriptive message.ayumin2015-01-041-5/+5
| | | | | | following r49131. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: assert_filenobu2015-01-041-1/+1
| | | | | | | * test/test_tempfile.rb (test_default_basename): use assert_file for more descriptive message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb: provide default basename parameter.hsbt2015-01-041-0/+5
| | | | | | | [fix GH-523] Patch by @dissolved * test/test_tempfile.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/lib/envutil.rb: Moved from test/ruby/.akr2014-11-131-1/+0
| | | | | | | | | | | | | | * test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tempfile.rb: fix r47655nobu2014-09-211-0/+1
| | | | | | | | | | | | * lib/tempfile.rb (Tempfile#initialize, Tempfile.create): get rid of shadowing local variables. * lib/tmpdir.rb (Dir::Tmpname#make_tmpname): simlify argument splitting. * test/test_tempfile.rb: need thread library for ConditionVariable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: suppress warningsnobu2013-11-211-2/+1
| | | | | | | | | | * test/test_tempfile.rb (test_tempfile_is_unlinked_when_ruby_exits): no error should emit. * test/test_tempfile.rb (test_tempfile_encoding_ascii8bit): remove unused variable. * test/test_tempfile.rb (test_tempfile_encoding_ascii8bit2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_tempfile.rb: fix test on Windowsnobu2013-10-061-0/+1
| | | | | | | * test/test_tempfile.rb (test_tempfile_finalizer_does_not_run_if_unlinked): open file cannot be deleted on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tempfile.rb: undefine finalizer on unlinknobu2013-10-011-0/+14
| | | | | | | | * lib/tempfile.rb (Tempfile#unlink): finalizer is no longer needed after unlinking. patched by by normalperson (Eric Wong) at [ruby-core:56521] [Bug #8768] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Tempfile.create): New method.akr2013-04-201-0/+21
| | | | | | | | | The method name is proposed by Shugo Maeda. [ruby-dev:47220] [ruby-core:41478] [Feature #5707] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tempfile.rb: simply ignore platform depedent testcasesusa2011-04-041-8/+4
| | | | | | | instead of skipping. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_systmpdir): assume system default tmpdirnobu2010-09-091-0/+4
| | | | | | safe. [ruby-dev:42089] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tempfile.rb: skip some tests on Windows because unlinking is alwaysusa2010-05-261-0/+4
| | | | | | | delayed till closed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tempfile.rb: fixed errors.nobu2010-05-011-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Tempfile#size): stat by path name when it isnobu2010-05-011-8/+8
| | | | | | closed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Tempfile#open): re-open with same mode andnobu2010-03-291-0/+2
| | | | | | options as initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tempfile.rb (Tempfile#initialize): option hash may not benobu2009-11-111-3/+17
| | | | | | | given. [ruby-core:26681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tempfile.rb: merged from Hongli Lai's fork.nobu2009-08-261-4/+257
| | | | | | | cf [ruby-core:25131]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add test for encoding option.xibbar2008-10-181-0/+21
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2008-01-071-0/+14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e