merge revision(s) 50141: [Backport #11021]

* lib/fileutils.rb (FileUtils#mv): show the exact target path in
	  the error message instead of the destination parent directory
	  name.  patched by Joao Britto <jabcalves AT gmail.com> at
	  [ruby-core:68706].  [Bug #11021]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2015-05-13 15:32:22 +00:00
parent 0224bb0385
commit a1f41cafe8
4 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,10 @@
Thu May 14 00:29:44 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/fileutils.rb (FileUtils#mv): show the exact target path in
the error message instead of the destination parent directory
name. patched by Joao Britto <jabcalves AT gmail.com> at
[ruby-core:68706]. [Bug #11021]
Thu May 14 00:19:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> Thu May 14 00:19:04 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* thread_pthread.c (reserve_stack): keep sp safe zone to get rid * thread_pthread.c (reserve_stack): keep sp safe zone to get rid

View file

@ -518,7 +518,7 @@ module FileUtils
begin begin
if destent.exist? if destent.exist?
if destent.directory? if destent.directory?
raise Errno::EEXIST, dest raise Errno::EEXIST, d
else else
destent.remove_file if rename_cannot_overwrite_file? destent.remove_file if rename_cannot_overwrite_file?
end end

View file

@ -416,7 +416,8 @@ class TestFileUtils < Test::Unit::TestCase
mkdir 'tmp/tmpdir' mkdir 'tmp/tmpdir'
mkdir_p 'tmp/dest2/tmpdir' mkdir_p 'tmp/dest2/tmpdir'
assert_raise(Errno::EEXIST) { assert_raise_with_message(Errno::EEXIST, %r' - tmp/dest2/tmpdir\z',
'[ruby-core:68706] [Bug #11021]') {
mv 'tmp/tmpdir', 'tmp/dest2' mv 'tmp/tmpdir', 'tmp/dest2'
} }
mkdir 'tmp/dest2/tmpdir/junk' mkdir 'tmp/dest2/tmpdir/junk'

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.2.3" #define RUBY_VERSION "2.2.3"
#define RUBY_RELEASE_DATE "2015-05-14" #define RUBY_RELEASE_DATE "2015-05-14"
#define RUBY_PATCHLEVEL 98 #define RUBY_PATCHLEVEL 99
#define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 5 #define RUBY_RELEASE_MONTH 5