ruby-changes:16858
From: mame <ko1@a...>
Date: Wed, 4 Aug 2010 19:19:13 +0900 (JST)
Subject: [ruby-changes:16858] Ruby:r28854 (ruby_1_9_2): merges r28833 from trunk to ruby_1_9_2.
mame 2010-08-04 19:14:01 +0900 (Wed, 04 Aug 2010) New Revision: 28854 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28854 Log: merges r28833 from trunk to ruby_1_9_2. -- * file.c (file_expand_path): wrong condition. [ruby-core:31591] Modified files: branches/ruby_1_9_2/ChangeLog branches/ruby_1_9_2/file.c branches/ruby_1_9_2/test/ruby/test_file_exhaustive.rb Index: ruby_1_9_2/ChangeLog =================================================================== --- ruby_1_9_2/ChangeLog (revision 28853) +++ ruby_1_9_2/ChangeLog (revision 28854) @@ -1,3 +1,7 @@ +Mon Aug 2 12:22:22 2010 NAKAMURA Usaku <usa@r...> + + * file.c (file_expand_path): wrong condition. [ruby-core:31591] + Thu Jul 29 02:38:09 2010 NARUSE, Yui <naruse@r...> * configure.in: not [freebsd] but [freebsd*] for AS_CASE. Index: ruby_1_9_2/test/ruby/test_file_exhaustive.rb =================================================================== --- ruby_1_9_2/test/ruby/test_file_exhaustive.rb (revision 28853) +++ ruby_1_9_2/test/ruby/test_file_exhaustive.rb (revision 28854) @@ -393,6 +393,7 @@ assert_equal(@file, File.expand_path(@file + " ")) assert_equal(@file, File.expand_path(@file + ".")) assert_equal(@file, File.expand_path(@file + "::$DATA")) + assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]') end assert_kind_of(String, File.expand_path("~")) unless /mingw|mswin/ =~ RUBY_PLATFORM Index: ruby_1_9_2/file.c =================================================================== --- ruby_1_9_2/file.c (revision 28853) +++ ruby_1_9_2/file.c (revision 28854) @@ -2884,7 +2884,7 @@ else { /* specified drive, but not full path */ int same = 0; - if (!NIL_P(dname) || !not_same_drive(dname, s[0])) { + if (!NIL_P(dname) && !not_same_drive(dname, s[0])) { file_expand_path(dname, Qnil, abs_mode, result); BUFINIT(); if (has_drive_letter(p) && TOLOWER(p[0]) == TOLOWER(s[0])) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/