diff --git a/ChangeLog b/ChangeLog index 0fb6e768ad..9cefa5d11f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu May 14 00:29:44 2015 Nobuyoshi Nakada + + * 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 at + [ruby-core:68706]. [Bug #11021] + Thu May 14 00:19:04 2015 Nobuyoshi Nakada * thread_pthread.c (reserve_stack): keep sp safe zone to get rid diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 23fd19310a..932776c847 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -518,7 +518,7 @@ module FileUtils begin if destent.exist? if destent.directory? - raise Errno::EEXIST, dest + raise Errno::EEXIST, d else destent.remove_file if rename_cannot_overwrite_file? end diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index fe9a1b327d..295fbfd960 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -416,7 +416,8 @@ class TestFileUtils < Test::Unit::TestCase mkdir 'tmp/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' } mkdir 'tmp/dest2/tmpdir/junk' diff --git a/version.h b/version.h index 9dfefb2cb2..d9b49e8d5a 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.2.3" #define RUBY_RELEASE_DATE "2015-05-14" -#define RUBY_PATCHLEVEL 98 +#define RUBY_PATCHLEVEL 99 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 5