ruby-changes:15502
From: nobu <ko1@a...>
Date: Tue, 20 Apr 2010 00:43:25 +0900 (JST)
Subject: [ruby-changes:15502] Ruby:r27404 (trunk, ruby_1_8): * file.c (rb_file_s_extname): skip last directory separators.
nobu 2010-04-20 00:43:05 +0900 (Tue, 20 Apr 2010) New Revision: 27404 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27404 Log: * file.c (rb_file_s_extname): skip last directory separators. [ruby-core:29627] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/file.c branches/ruby_1_8/test/ruby/test_file_exhaustive.rb branches/ruby_1_8/version.h trunk/ChangeLog trunk/file.c trunk/test/ruby/test_file_exhaustive.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 27403) +++ ChangeLog (revision 27404) @@ -1,3 +1,8 @@ +Tue Apr 20 00:43:03 2010 Nobuyoshi Nakada <nobu@r...> + + * file.c (rb_file_s_extname): skip last directory separators. + [ruby-core:29627] + Tue Apr 20 00:41:25 2010 Nobuyoshi Nakada <nobu@r...> * io.c (internal_{read,write}_func, rb_{read,write}_internal): Index: test/ruby/test_file_exhaustive.rb =================================================================== --- test/ruby/test_file_exhaustive.rb (revision 27403) +++ test/ruby/test_file_exhaustive.rb (revision 27404) @@ -454,6 +454,8 @@ end end end + bug3175 = '[ruby-core:29627]' + assert_equal(".rb", File.extname("/tmp//bla.rb"), bug3175) assert_incompatible_encoding {|d| File.extname(d)} end Index: file.c =================================================================== --- file.c (revision 27403) +++ file.c (revision 27404) @@ -3500,7 +3500,7 @@ if (!p) p = name; else - name = ++p; + do name = ++p; while (isdirsep(*p)); e = 0; while (*p && *p == '.') p++; Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 27403) +++ ruby_1_8/ChangeLog (revision 27404) @@ -1,3 +1,8 @@ +Tue Apr 20 00:43:03 2010 Nobuyoshi Nakada <nobu@r...> + + * file.c (rb_file_s_extname): skip last directory separators. + [ruby-core:29627] + Mon Apr 19 19:42:08 2010 URABE Shyouhei <shyouhei@r...> * lib/fileutils.rb (FileUtils::cp_r): dup needed here; options are Index: ruby_1_8/version.h =================================================================== --- ruby_1_8/version.h (revision 27403) +++ ruby_1_8/version.h (revision 27404) @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.8" -#define RUBY_RELEASE_DATE "2010-04-19" +#define RUBY_RELEASE_DATE "2010-04-20" #define RUBY_VERSION_CODE 188 -#define RUBY_RELEASE_CODE 20100419 +#define RUBY_RELEASE_CODE 20100420 #define RUBY_PATCHLEVEL -1 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 8 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 19 +#define RUBY_RELEASE_DAY 20 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8/test/ruby/test_file_exhaustive.rb =================================================================== --- ruby_1_8/test/ruby/test_file_exhaustive.rb (revision 27403) +++ ruby_1_8/test/ruby/test_file_exhaustive.rb (revision 27404) @@ -403,6 +403,8 @@ end end end + bug3175 = '[ruby-core:29627]' + assert_equal(".rb", File.extname("/tmp//bla.rb"), bug3175) end def test_split Index: ruby_1_8/file.c =================================================================== --- ruby_1_8/file.c (revision 27403) +++ ruby_1_8/file.c (revision 27404) @@ -3015,7 +3015,7 @@ if (!p) p = name; else - name = ++p; + do name = ++p; while (isdirsep(*p)); e = 0; while (*p && *p == '.') p++; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/