ruby-changes:16145
From: naruse <ko1@a...>
Date: Mon, 31 May 2010 17:47:23 +0900 (JST)
Subject: [ruby-changes:16145] Ruby:r28105 (trunk): * file.c (file_expand_path): Refix r28102: this breaks
naruse 2010-05-31 17:47:08 +0900 (Mon, 31 May 2010) New Revision: 28105 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=28105 Log: * file.c (file_expand_path): Refix r28102: this breaks r28039. test for [ruby-dev:41429] is added. [ruby-core:30516] Modified files: trunk/ChangeLog trunk/file.c trunk/test/ruby/test_path.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 28104) +++ ChangeLog (revision 28105) @@ -1,3 +1,8 @@ +Mon May 31 15:07:18 2010 NARUSE, Yui <naruse@r...> + + * file.c (file_expand_path): Refix r28102: this breaks + r28039. test for [ruby-dev:41429] is added. [ruby-core:30516] + Mon May 31 14:47:09 2010 NARUSE, Yui <naruse@r...> * string.c (rb_str_inspect): inspect as ASCII when the codepoint Index: test/ruby/test_path.rb =================================================================== --- test/ruby/test_path.rb (revision 28104) +++ test/ruby/test_path.rb (revision 28105) @@ -42,6 +42,8 @@ end assert_equal("//", File.expand_path(".", "//")) assert_equal("//sub", File.expand_path("sub", "//")) + + assert_equal("/tmp/\u3042", File.expand_path("\u3042", "/tmp")) end def test_dirname Index: file.c =================================================================== --- file.c (revision 28104) +++ file.c (revision 28105) @@ -2887,7 +2887,8 @@ xfree(dir); rb_enc_associate_index(result, rb_filesystem_encindex()); } - else rb_enc_check(result, fname); + else + rb_enc_associate(result, rb_enc_check(result, fname)); p = chompdirsep(skiproot(buf)); s += 2; } @@ -2897,7 +2898,7 @@ if (!NIL_P(dname)) { file_expand_path(dname, Qnil, abs_mode, result); BUFINIT(); - rb_enc_check(result, fname); + rb_enc_associate(result, rb_enc_check(result, fname)); } else { char *dir = my_getcwd(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/