diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-22 09:49:44 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-22 09:49:44 +0000 |
| commit | 7b9cd8c0b661f4a434fc262fc23da62fa69bf1ea (patch) | |
| tree | b2c5fbba5923498965105a3bfb70c733473c00d0 | |
| parent | a922df795b333a56bedfb0428348ed35f31720ca (diff) | |
merges r23494 from trunk into ruby_1_9_1.
--
* lib/tempfile.rb (Tempfile#unlink): close first for Windows. a
patch from Florian Frank. [ruby-core:23505]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | lib/tempfile.rb | 5 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Wed May 20 06:20:05 2009 Yukihiro Matsumoto <matz@ruby-lang.org> + + * lib/tempfile.rb (Tempfile#unlink): close first for Windows. a + patch from Florian Frank. [ruby-core:23505] + Wed May 20 00:05:52 2009 Yukihiro Matsumoto <matz@ruby-lang.org> * vm_method.c (rb_attr): should preserve encoding info. diff --git a/lib/tempfile.rb b/lib/tempfile.rb index 601bb8d2f8..3319d4f886 100644 --- a/lib/tempfile.rb +++ b/lib/tempfile.rb @@ -136,7 +136,10 @@ class Tempfile < DelegateClass(File) def unlink # keep this order for thread safeness begin - File.unlink(@tmpname) if File.exist?(@tmpname) + if File.exist?(@tmpname) + closed? or close + File.unlink(@tmpname) + end @@cleanlist.delete(@tmpname) @data = @tmpname = nil ObjectSpace.undefine_finalizer(self) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-12" -#define RUBY_PATCHLEVEL 151 +#define RUBY_PATCHLEVEL 152 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |
