summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-08 05:49:26 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-08 05:49:26 +0000
commitbb74a0d0d18107f138c1f87c098f2de0cb82fe01 (patch)
treeb3776b09c905e2fb7da51c8c90ac2d960fd05088
parent73c6469a00a5fadf26c35689231656a02092f594 (diff)
merge revision(s) 36306: [Backport #7296]
* test/win32ole/test_win32ole.rb (test_s_codepage_changed): FileSystemObject only supports ANSI or UTF-16LE encoding. Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@37555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--test/win32ole/test_win32ole.rb5
-rw-r--r--version.h2
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fcec971139..c6fe8f07a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Nov 8 14:46:17 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
+ FileSystemObject only supports ANSI or UTF-16LE encoding.
+ Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]
+
+
Thu Nov 8 14:43:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_dir_m17n.rb: refactoring. RE should be in the left side
diff --git a/test/win32ole/test_win32ole.rb b/test/win32ole/test_win32ole.rb
index 8d72272b9c..c7317f83de 100644
--- a/test/win32ole/test_win32ole.rb
+++ b/test/win32ole/test_win32ole.rb
@@ -351,8 +351,9 @@ if defined?(WIN32OLE)
WIN32OLE.codepage = cp
file = fso.opentextfile(fname, 2, true)
+ test_str = [0x3042].pack("U*").encode("UTF-16LE")
begin
- file.write [0x3042].pack("U*").force_encoding("UTF-8")
+ file.write test_str.force_encoding("UTF-16")
ensure
file.close
end
@@ -360,7 +361,7 @@ if defined?(WIN32OLE)
open(fname, "r:ascii-8bit") {|ifs|
str = ifs.read
}
- assert_equal("\202\240", str)
+ assert_equal(test_str.force_encoding("ascii-8bit"), str)
# This test fail if codepage 20932 (euc) is not installed.
begin
diff --git a/version.h b/version.h
index 0e37133775..9a2bbb3eae 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 311
+#define RUBY_PATCHLEVEL 312
#define RUBY_RELEASE_DATE "2012-11-08"
#define RUBY_RELEASE_YEAR 2012