ruby-changes:21824
From: usa <ko1@a...>
Date: Mon, 28 Nov 2011 09:34:11 +0900 (JST)
Subject: [ruby-changes:21824] usa:r33873 (trunk): * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671]
usa 2011-11-28 09:33:18 +0900 (Mon, 28 Nov 2011) New Revision: 33873 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33873 Log: * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898] * test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug. Modified files: trunk/ChangeLog trunk/test/ruby/test_file.rb trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33872) +++ ChangeLog (revision 33873) @@ -1,3 +1,9 @@ +Mon Nov 28 09:28:30 2011 NAKAMURA Usaku <usa@r...> + + * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898] + + * test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug. + Sun Nov 27 21:25:33 2011 KOSAKI Motohiro <kosaki.motohiro@g...> * configure.in: added -fno-strict-overflow. it suppress annoying Index: win32/win32.c =================================================================== --- win32/win32.c (revision 33872) +++ win32/win32.c (revision 33873) @@ -6032,7 +6032,7 @@ WCHAR *wpath; int ret; - if (!(wpath = filecp_to_wstr(path, NULL))) + if (!(wpath = utf8_to_wstr(path, NULL))) return -1; ret = _wchmod(wpath, mode); free(wpath); Index: test/ruby/test_file.rb =================================================================== --- test/ruby/test_file.rb (revision 33872) +++ test/ruby/test_file.rb (revision 33873) @@ -195,4 +195,13 @@ puts '#{bug5596}' EOS end + + def test_chmod_m17n + bug5671 = '[ruby-dev:44898]' + Dir.mktmpdir('test-file-chmod-m17n-') do |tmpdir| + file = File.join(tmpdir, "\u3042") + File.open(file, 'w'){} + assert_equal(File.chmod(0666, file), 1, bug5671) + end + end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/